Axel Schmolitzky, M. Evered, J. L. Keedy, G. Menger
{"title":"如何使实用类方法中的协方差成为静态类型安全的?","authors":"Axel Schmolitzky, M. Evered, J. L. Keedy, G. Menger","doi":"10.1109/TOOLS.1999.809426","DOIUrl":null,"url":null,"abstract":"Binary class methods are often more suitable for modelling binary operations than binary instance methods. Allowing covariant parameter type adaptations in class methods can make them even more attractive. We discuss the implications of covariant class methods on type safety. We discuss two examples, one type-safe at run-time and the other not, and formulate type rules that make it possible to identify the difference at compile-time.","PeriodicalId":272695,"journal":{"name":"Proceedings Technology of Object-Oriented Languages and Systems. TOOLS 32","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1999-11-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"How can covariance in pragmatical class methods be made statically type-safe?\",\"authors\":\"Axel Schmolitzky, M. Evered, J. L. Keedy, G. Menger\",\"doi\":\"10.1109/TOOLS.1999.809426\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Binary class methods are often more suitable for modelling binary operations than binary instance methods. Allowing covariant parameter type adaptations in class methods can make them even more attractive. We discuss the implications of covariant class methods on type safety. We discuss two examples, one type-safe at run-time and the other not, and formulate type rules that make it possible to identify the difference at compile-time.\",\"PeriodicalId\":272695,\"journal\":{\"name\":\"Proceedings Technology of Object-Oriented Languages and Systems. TOOLS 32\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1999-11-22\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings Technology of Object-Oriented Languages and Systems. TOOLS 32\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/TOOLS.1999.809426\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings Technology of Object-Oriented Languages and Systems. TOOLS 32","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/TOOLS.1999.809426","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
How can covariance in pragmatical class methods be made statically type-safe?
Binary class methods are often more suitable for modelling binary operations than binary instance methods. Allowing covariant parameter type adaptations in class methods can make them even more attractive. We discuss the implications of covariant class methods on type safety. We discuss two examples, one type-safe at run-time and the other not, and formulate type rules that make it possible to identify the difference at compile-time.