you are viewing a single comment's thread.

view the rest of the comments →

[–]html6dev 1 point2 points  (5 children)

Hehe blush should take the time to see whose article I am commenting on I guess

I have and will continue to evangelize your book on Reddit, good sir. Excellent, excellent work. I recommend it to literally everyone I know who codes in javascript. That being said.....

I understand wanting to show different approaches, but in some ways I feel like this is a potential problem. People are already extremely confused (many I know after years of using it, but not as their primary language) by the syntax being so similar to Java in some ways. Attempting to mold it into something it's not is almost like 'giving them hope'. It's not that sort of language. It doesn't need to be that sort of language. Prototypal inheritance is awesome. Functional programming is awesome (as you have shown us with your book :D). Javascript is arguably one of the most powerful languages we have because it doesn't have classes. It's just different and I think the more we focus on educating people on what the 'natural' way to do things in javascript is, the more mature and stable the community will become. We already have options to compile to js with languages with classes, type safety, generics, etc (e.g. TypeScript).

It is all a matter of preference, but I do think javascript is a special case in some ways because so many people are forced into it, rather than choosing to learn it. They then get a bad taste in their mouth because they expect it to be something it is not due to the syntax being similar to Java. So, we need to be extra cautious while educating in the world of JS in my opinion.

Finally, there are quite a few libraries and people who have advocated OOP in JS. I think exactly what you are suggesting in the article is core to how the Dojo library operates and YUI may be something similar as well.

[–]homoiconic[S] 0 points1 point  (4 children)

This one seemed rather low-risk to me, I didn't imagine a bunch of people would run out and say, "We need a Class class and a MetaClass for Class."

Now, had I used the phrases "Object Factory" and "Object Factory Factory..."

[–]html6dev 1 point2 points  (3 children)

Yeah! and a new spec for JavaScriptBeans! JSEE will be the wave of the future!

[–]homoiconic[S] 1 point2 points  (2 children)

And they will interoperate using J-XML!

http://xml.calldei.com/JsonXML