Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Property hooks are the headline feature, but they seem like something I'd rarely use in practice. It is nice to have the option available though, in case I need to add extra logic to a property without breaking everywhere that it's accessed.


> A primary use case for hooks is actually to not use them, but retain the ability to do so in the future, should it become necessary.

My personal motivation was always to finally put an end to the getters/setters boilerplate.




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

Search: