soc.me · Jul 7, 2022
Language Design: Fields & Methods & Properties? – Pick Two!
0Sign in to vote or save
This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.
TL;DR: Properties are a hack employed to retrofit “nice” syntax into languages that already shipped with fields and methods. Instead, design the language to deliver the same (or more) benefits with fields! Why do properties exist? The core feature of properties, in rough terms, is that (unlike getters and setters) property invocations look like field access, but retain the possibility to add logic…
Read on /languages/fields-methods-properties-pick-two.html ↗
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.