News for hackers. Stuff that matters.
Re:JavaScript - It’s a Real Language by RyanMcGreal on Friday October 01, 2010 @11:34AM (#1747337)
I know it's been said many times, but Crockford's Javascript: The Good Parts is a wonderful approach that squeezes maximum value, maturity and robustness out of a mostly-good language with some spectacularly bad bits.
Re:JavaScript - It’s a Real Language by MartinCron on Friday October 01, 2010 @12:39PM (#1747603)
Going to chime in here. JavaScript: The Good Parts isn't just one of those crazy-useful technical books. It's also just good reading, if that makes sense.

It's also very short. A total breath of fresh air in an industry where so many publishers have a "bigger is better" mentality.

Re:JavaScript - It’s a Real Language by jianshen on Friday October 01, 2010 @01:05PM (#1747707)
+1 for good Javascript teaching

I wish there was a single curriculum that most JS developers were exposed to and can point to.

Every JS developer I meet has a different way of doing encapsulation and abstraction. This makes it terribly confusing for developers new to the environment who just want to know "the typical way" you do XYZ.

Re:JavaScript - It’s a Real Language by InclinedPlane on Friday October 01, 2010 @01:08PM (#1747721)
Javascript has 3 serious, fundamental problems. The first is that it's a prototypal language that's been forced into looking like a class-based OO language. This leads people to confusion and frustration, much the same as if you were making a burrito and someone replaced your ingredients with pita bread and hummus. If you try to work against the grain by imagining that JS is just another class-based language you will end up thinking that it's some crazy mutant language that doesn't make sense. If you go into it understanding the paradigm and how to make the best use of it you'll get much better results.

The second major problem with Javascript is that it was prematurely standardized due to excessive pressure to ship during development, and thus has a lot of little mis-features and defects in the core language that haven't been fixed due to concerns about breaking backward compatibility. Luckily it's generally possible to avoid these areas of the language without having to compromise your code so it's just a matter of keeping to good practices and of knowing what to avoid.

The third problem is that Javascript is primarily a web technology where it is married to the DOM, and historically browser DOMs have been a mess: non-standardized, buggy, sometimes slow.

Overall the result is a language with a few landmines that need to be tiptoed around but that is still very solid in its fundamentals. Compare that with many other languages that are more polished and yet fundamentally limited in significant ways (such as Java's lack of closures, for example).

The wonderful thing about JS is that because of its expressiveness, power, and advanced featureset, using the language properly becomes a potent self-reinforcing feedback loop, jQuery is one of the better examples of this.

Re:JavaScript - It’s a Real Language by silentbicycle on Friday October 01, 2010 @02:08PM (#1747946)
If you want to see what Javascript could have become without premature standardization, check out Lua (http://www.lua.org/). It doesn't get that much hype because it isn't married to the web, but it's popular in other niches, particularly the gaming industry. It's designed for scripting C / C++ applications, but also works well as a standalone language.

It's like a tasteful mix of Python and Javascript, but without any of the fat. It's very dynamic, has a small, extremely portable, and high-performance implementation (in a ~200k C library), has prototype-based objects, a JSON-like native datatype, and a better JIT (http://luajit.org/) than any JS implementation thus far.

Recommended introduction: Ierusalimschy's _Programming in Lua, 2nd ed._ (http://www.inf.puc-rio.br/~roberto/pil2/).

Re:JavaScript - It’s a Real Language by orangecat on Friday October 01, 2010 @01:23PM (#1747767)
Exactly right. I don't understand why there can't be a Javascript 2.0 that fixes its ridiculous misfeatures, and that you opt-in to with <script language="js2"> or something. So browsers would have to include two interpreters, but they're so bloated as it is I doubt it would be noticeable.
Re:JavaScript - It’s a Real Language by wallfly on Friday October 01, 2010 @01:46PM (#1747854)
Check out Joose, which is an object layer built with JavaScript on top of Javascript, amazing stuff!!

http://joose.it/

http://openjsan.org/doc/s/sa/samuraijack/Joose/3.011/lib/Joo...

Re:JavaScript - It’s a Real Language by msie on Friday October 01, 2010 @02:21PM (#1748002)
Has someone tried to do this? Google?