Live data from Hacker News

Understanding Javascript OOP

killdream.github.com

1–10 of 23 posts

Re: Understanding Javascript OOP

#2
The ES6 draft spec now includes the (maximally minimal) class spec that was hashed out at the July TC 39 meeting. You can read the spec here: http://wiki.ecmascript.org/doku.php?id=harmony:specification... and see some examples here: http://wiki.ecmascript.org/doku.php?id=strawman:maximally_mi...

There's a cool project, Harmonizr (https://github.com/jdiamond/harmonizr) which transpiles ES6 to ES5, which you can leverage to start using classes, modules, arrow syntax, etc. now. Demo: http://jdiamond.github.com/harmonizr/demo/demo.html

Re: Understanding Javascript OOP

#3
post #2

The ES6 draft spec now includes the (maximally minimal) class spec that was hashed out at the July TC 39 meeting. You can read the spec here: http://wiki.ecmascript.org/doku.php?id=harmony:specification... and see some examples here: http://wiki.ecmascript.org/doku.php?id=strawman:maximally_mi... There's a cool project, Harmonizr ( https://github.com/jdiamond/harmonizr ) which transpiles ES6 to ES5, which you can lev…

thank the lord, i can't imagine something as ubiquitous as javascript still has no syntactically intuitive class system

Re: Understanding Javascript OOP

#4
post #2

The ES6 draft spec now includes the (maximally minimal) class spec that was hashed out at the July TC 39 meeting. You can read the spec here: http://wiki.ecmascript.org/doku.php?id=harmony:specification... and see some examples here: http://wiki.ecmascript.org/doku.php?id=strawman:maximally_mi... There's a cool project, Harmonizr ( https://github.com/jdiamond/harmonizr ) which transpiles ES6 to ES5, which you can lev…

thank the lord, i can't imagine something as ubiquitous as javascript still has no syntactically intuitive class system

The MooTools library implements declarative class syntax for regular javascript:

http://mootools.net/docs/core/Class/Class

Re: Understanding Javascript OOP

#5

Earlier quoted context omitted.

thank the lord, i can't imagine something as ubiquitous as javascript still has no syntactically intuitive class system

The MooTools library implements declarative class syntax for regular javascript: http://mootools.net/docs/core/Class/Class

The next trick is for libraries to make sure their homegrown class systems are migrated to ES6 classes, or interop with consistent semantics.

Re: Understanding Javascript OOP

#6
Thanks for that. In my mind I've been calling C++, C#, etc. "class-based" programming since the design/programming phase is really focussed on classes. I've not much experience with prototype-based programming other than the occasional blurb. This is a nice intro.

Re: Understanding Javascript OOP

#9
post #6

Thanks for that. In my mind I've been calling C++, C#, etc. "class-based" programming since the design/programming phase is really focussed on classes. I've not much experience with prototype-based programming other than the occasional blurb. This is a nice intro.

[deleted]
Post reply on HN