News for hackers. Stuff that matters.
Re:App Engine JavaScript SDK by artlogic on Monday May 31, 2010 @10:18AM (#1392550)
I used to feel this way. The two people that changed my mind were John Resig and Douglas Crockford. Resig's jQuery project has been, for me, a guide to how JS should be written. Crockford's JS the Good Parts and JSLint have helped as well by providing some solid reference on what to do and, more importantly, what not to do.

Lots of folks only see the DOM and the bad parts when working with JS - these two projects have shown me there's so much more.

Re:App Engine JavaScript SDK by orangecat on Monday May 31, 2010 @03:08PM (#1393202)
Lots of folks only see the DOM and the bad parts when working with JS

Agreed that you can't blame Javascript for the DOM, but there are lots of bad parts aside from that. Default global scope and semioptional semicolons are gigantic WTFs, the with statement should be nuked from orbit, and there are generally lots of ways to write code that appears to be correct but is just waiting to fail in bizarre ways. It's just annoying that we're stuck with Javascript because it's so entrenched, while Python and Ruby offer all of its strengths in much saner packages.

Re:App Engine JavaScript SDK by artlogic on Thursday June 03, 2010 @03:07PM (#1402181)
I believe I did say "and the bad parts". I agree - there are lots of bad parts to JS - I often wish it could be remade without the bad parts. However, a lot of these bad parts can be mitigated with sane conventions - that's what Crockford's "Good Parts" is all about. If you haven't read it, I highly suggest it.

I can't speak for Ruby, but in many ways JS is more powerful than Python, especially on the functional side of the house.

Re:App Engine JavaScript SDK by polgardy on Tuesday June 01, 2010 @10:17AM (#1395075)
jQuery is a great project, but it's definitely NOT how JS should be written. Its goal is to be fast, unobtrusive, and work in most browsers at the expense of comprehensibility.
Re:App Engine JavaScript SDK by artlogic on Thursday June 03, 2010 @03:03PM (#1402171)
I'd argue that jQuery embraces a lot of ideas that new JS programmers often overlook - functions as objects for example. jQuery also gives you primitives to perform functional/set based operations.

For me, approaching JS as a functional language has been the key to writing good clean JS. jQuery helped me with this by allowing me to ignore all the psuedo OO stuff in JS and concentrate on the functional features.