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

However, in JS they have a specific [read, established] meaning, in the OOP sense.

[It's a term established in the language specification.]



> [It's a term established in the language specification.]

I'd say JS getters/setters are syntactic sugar for the OOP concept the author is talking about.


It's the main mechanism in JS to define functional accessors, at least since ECMA-Script 3. Before this, the terms have been used loosely, as well, for explicit accessor methods (like in Java).

[Edit] Correction: should have been, at least since ECMA-262 5th Ed.




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

Search: