Hacker News new | past | comments | ask | show | jobs | submit login

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.






This 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.



Applications are open for YC Summer 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: