3 ms·
Getters and setters are not a "concept" in OOP. They're just a naming convention that is occasionally built into language syntax for brevity. FP people constan
by BrainVirus 4y ago
Getters and setters are not a "concept" in OOP. They're just a naming convention that is occasionally built into language syntax for brevity.
FP people constantly miss something fundamental about OOP. Objects only exist at runtime. Any facility that provides powerful tools to deal with objects has to be runtime-oriented and would require corresponding language support. E.g. Mirrors: https://bracha.org/mirrors.pdf https://bracha.org/mirrors.pdf
- hither_shores 4y agoThey're using "getters and setters" to refer to reading from and writing to fields, not `get => ... ; set => ...` style syntactic sugar.