{"title":"面向对象语言中复合值的函数定义","authors":"J. Chrzaszcz, Aleksy Schubert","doi":"10.1145/3131851.3131860","DOIUrl":null,"url":null,"abstract":"Declarative programming features are gradually included in the design of object-oriented languages such as Java and C++. These languages recently adopted anonymous function definitions and offer basic primitives that restrict changes on data, namely final and const keywords, respectively. We propose a type system for an object-oriented Java-like language that facilitates declarative programming while leaving programmers significant freedom in use of imperative features. The system allows one to delimit compound value representations and effectively define values that are common in functional programming languages. Given that, we distinguish methods that work as first-order functions on such values. In this framework functions may modify internal working state that is clearly separated from the global state of the program. The system exploits access modes for method arguments, which describe the way the method operates on the given entity representation.","PeriodicalId":148157,"journal":{"name":"Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-10-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Function definitions for compound values in object-oriented languages\",\"authors\":\"J. Chrzaszcz, Aleksy Schubert\",\"doi\":\"10.1145/3131851.3131860\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Declarative programming features are gradually included in the design of object-oriented languages such as Java and C++. These languages recently adopted anonymous function definitions and offer basic primitives that restrict changes on data, namely final and const keywords, respectively. We propose a type system for an object-oriented Java-like language that facilitates declarative programming while leaving programmers significant freedom in use of imperative features. The system allows one to delimit compound value representations and effectively define values that are common in functional programming languages. Given that, we distinguish methods that work as first-order functions on such values. In this framework functions may modify internal working state that is clearly separated from the global state of the program. The system exploits access modes for method arguments, which describe the way the method operates on the given entity representation.\",\"PeriodicalId\":148157,\"journal\":{\"name\":\"Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2017-10-09\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3131851.3131860\",\"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 of the 19th International Symposium on Principles and Practice of Declarative Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3131851.3131860","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Function definitions for compound values in object-oriented languages
Declarative programming features are gradually included in the design of object-oriented languages such as Java and C++. These languages recently adopted anonymous function definitions and offer basic primitives that restrict changes on data, namely final and const keywords, respectively. We propose a type system for an object-oriented Java-like language that facilitates declarative programming while leaving programmers significant freedom in use of imperative features. The system allows one to delimit compound value representations and effectively define values that are common in functional programming languages. Given that, we distinguish methods that work as first-order functions on such values. In this framework functions may modify internal working state that is clearly separated from the global state of the program. The system exploits access modes for method arguments, which describe the way the method operates on the given entity representation.