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

Gosu supports a property syntax that lets you use = to assign things to get/set method pairs. In fact, when you load existing Java code, it replaces getFoo() and setFoo(foo) methods with a property.

This makes the code neater and enforces the abstraction--the user of the property does not need to know whether you've implemented it as a simple variable or a complicated method.

A bunch of other language let you do this as well.







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

Search: