Forgot your password?

Comment: Re:God please... (Score 1) 177

by narcc (#47428529) Attached to: Will Google's Dart Language Replace Javascript? (Video)

Yeah, fortunately that is being corrected in ES6. You don't really need to use require.js (it is awful!) though. I've been able to avoid it and similar solutions other ways, depending on the project.

As for the object model, it's undeniably superior. Google "classical vs prototypal inheritance" for a bunch of articles and (informed) discussions. Once you get a handle on it, you'll be amazed at how much effort it ultimately saves you. (Believe it or not, it's significantly simpler than the classical approach, and far more flexible.)

Would you recommend any books for learning javascript at a deeper level?

Not really. Crockford's book is okay, but far from perfect -- same with Flanagan's JavaScript: The Definitive Guide. They're probably the best of a bad bunch.

You really do have to toss out pretty much everything you know and start from scratch. If you try to use all those techniques you're used to from Java, you're going to pull your hair out. As an added bonus, you'll want to strangle Brendan Eich if you try to treat it like Lisp!

It's a whole different animal. My advice? Avoid new and constructor functions to shake off some of those old classical OO habits. Spend some time reading about prototype-based programming and event driven design (a good start there is decoupling with events). Your ACM DL subscription will pay for itself in cash saved in therapy.

Also, do you think Java is really hellish?

That may be a bit of an exaggeration, but I really don't care for it. Maybe I've just suffered through too much bad Java code? Still, I find it tedious.

Comment: Re:God please... (Score 1) 177

by narcc (#47426539) Attached to: Will Google's Dart Language Replace Javascript? (Video)

Too bad the people who wrote the mounds of code I have to maintain don't.

Indeed. It's very frustrating. I blame the glut of terrible books, though the tutorial websites are even worst.

Every feature of javascript is painful and can be abused easily.

I don't know about painful -- I found the language quite refreshing after years of Java and C# hell. It's very flexable, so abuse is easy; I can't deny that. A big part of the problem there, of course, is that it's so easy to make it act like a class-based language, which is a mistake all-too-frequently made by incompetent developers. The unnecessary new and constructor functions didn't help, and are likely responsible for the bulk of the confusion early-on.

Unfortunately, it's about to get a whole lot worse, as ES6 is going to add "classes". They're little more than sugar, but will further the confusion.

Comment: Re:Cry Me A River (Score 1) 559

by narcc (#47424063) Attached to: Normal Humans Effectively Excluded From Developing Software

I do know that not all JavaScript interpreters in use support the semantics of "use strict".

That's not what I was referring.

how should I go about determining whether the extent to which I have learned the language is enough to allow me not to make a fool of myself here on Slashdot?

When you stop getting abused on c.l.j? The easiest way to not say silly things is to check to make sure that what you're saying is accurate.

Comment: Re:Cry Me A River (Score 1) 559

by narcc (#47417693) Attached to: Normal Humans Effectively Excluded From Developing Software

One stupidity is global variables by default unless you use var every single time.

Fail! That's not entirely true for reasons that are obvious if you understand the language. Nice repeated meme though.

If your data is full of 64-bit integers, tough.

Or just use a bigint library, like users of other languages have done for years.

Really, if that's the best you manage, I'd love to see what language you think is well-designed. I guarantee that I can offer a criticism far more convincing that the one you've offered here.

Try learning the language first. You'll find that forming your own informed opinions is far more rewarding than the cheap up-mod you get for repeating nonsense.

Comment: Re:HTML5 & JS should just crawl away and die (Score 1) 104

by narcc (#47412791) Attached to: Do We Really Need Another JavaScript Framework?

Well, what can I say. jQuery is used by 80% of the top 10,000 most visited sites

McDonald's sells billions of hamburgers. I guess they must be of exceptional quality, right?

But then I am sure you have done nothing, and you are nobody

I'm sure you do. Belief without evidence is very common among the hopelessly irrational.

On Resig and his incompetence, I'll direct you to any of his books or to the jquery and jstat source. If that's not enough to convince you he's laughably incompetent, I'll direct you to comp.lang.javascript. There's a reason he banned his followers from reading that newsgroup.

"A mind is a terrible thing to have leaking out your ears." -- The League of Sadistic Telepaths