3 ms·
One small language feature I liked about Delphi was class properties. I used Delphi at my first job, while studying in the university, where we were taught Jav
by skeletal88 7y ago
One small language feature I liked about Delphi was class properties.
I used Delphi at my first job, while studying in the university, where we were taught Java (and C and other languages), what I really disliked were Java's getters and setters, which seemed like a clunky and pointless verbosity, compared to the properties in Delphi.
Python has the @property decorator, I wish other languages had something like that. Qt also has foo() and setFoo(), instead of getFoo(), which makes sense, and reduces verbosity and visual clutter.
- kwertzzz 7y agoThis is exactly what I like too about Delpi (and Pascal if I remember correctly) compared to C++ and Java. Julia, which I use now, has a similar feature but properties are less extensively used there (except for interoperability with Python). But it is a great feature to reduce the clutter in your code.