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

Mostly just convention, but it's also a more flexible pattern. A public instance variable cannot have public reads, but private writes for instance.

There is also the case of derived properties. e.g.

LocalDateTime ranAt

LocalDateTime finishedAt

getRuntime() { ... }




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

Search: