Live data from Hacker News

My gripes with JavaScript

ironjs.wordpress.com

31–40 of 48 posts

Re: My gripes with JavaScript

#32
ES6 Will improve things, see the presentation by Dimitry Soshnikov here: http://www.slideshare.net/dmitrysoshnikov/falsyvalues-dmitry...

Note the modules implementation ;)

While it will take a while for legacy browsers (IE 6-8) to die out, we are quickly moving to a regular automatic update process for browsers which will help us rev javascript quickly. I agree, right now it has problems.

But, on the server side we can implement these new features as soon as they are written into the interpreters. Less of a problem.

Re: My gripes with JavaScript

#33

Earlier quoted context omitted.

Chrome's ative code plugin NaCl lets you do this - there is a Tcl implementation using it so far, but no reason why there should not be others.

But NaCl in its current state is limited to a specific platforms, which is a big problem for a web app. Do you know if portable NaCl ever got anywhere?

Actually haven't seen anything for a bit. You are right we do need this too...

Re: My gripes with JavaScript

#34
His main point: "there are a couple of critical problems with JavaScript that prevents it from ever being a viable alternative as development platform for server application development."

But then he goes on to list things like "Lack of language defined modules and namespaces" (which it has in common with COBOL, C, and PHP), "null vs. undefined" (JS has eight kinds of nothingness — '', false, null, undefined, NaN, 0, [], and {} — as opposed to a usually slightly smaller number, although Python has nine: '', None, [], {}, (), NaN, 0, 0.0, and False), etc.

I think he has failed to prove his point.

Re: My gripes with JavaScript

#35
post #29
post #26

Earlier quoted context omitted.

The fact that everything you said is true makes JavaScript an even more amazing language. How many languages could survive 15 years without change and still remain relevant? And not only relevant, but expand their influence? Certainly this is mostly due to its unique position on the browser, but the language had to be flexible enough to fill that role and more. That's amazing .

IMO, it accomplishes this not as much by being good, as by being a parasite that infects web browsers. At that, it is so good that some people think the DOM and JavaScript are in a symbiotic relationship. Yes, that is tongue-in-cheek, but without JavaScript, web browsers would have found another language; without web browsers, JavaScript would long have been forgotten.

> IMO, it accomplishes this not as much by being good, as by being a parasite that infects web browsers.

My memory is a bit foggy, but I recall Microsoft throwing a bunch of things at the browser in the beginning. You can specify the language in the script tag. VBScript anyone?

It wasn't like JavaScript didn't have competition ... it just won a very long time ago.

Re: My gripes with JavaScript

#36
post #35
post #29

Earlier quoted context omitted.

IMO, it accomplishes this not as much by being good, as by being a parasite that infects web browsers. At that, it is so good that some people think the DOM and JavaScript are in a symbiotic relationship. Yes, that is tongue-in-cheek, but without JavaScript, web browsers would have found another language; without web browsers, JavaScript would long have been forgotten.

> IMO, it accomplishes this not as much by being good, as by being a parasite that infects web browsers. My memory is a bit foggy, but I recall Microsoft throwing a bunch of things at the browser in the beginning. You can specify the language in the script tag. VBScript anyone? It wasn't like JavaScript didn't have competition ... it just won a very long time ago.

In my memory, JavaScript won because it had market penetration, it did not get market penetration because it won.

It had market penetration because it was included with Netscape Navigator.

Yes, it also was good enough at that time, but almost anything would have been, in a time where a ten-line script was huge. I do not think that it would have won against say VBScript if the latter would have been available on the same set of browsers.

Re: My gripes with JavaScript

#37
Javascript is a really lousy language thrown together in two weeks or so.

What ideally should happen is browsers should expose the VM and an entry point for interpreters to use and configure JS on the VM. That way other languages could be used against the VM-in-browser.

I suspect Google is trying to move in this direction, but IDK.

Re: My gripes with JavaScript

#38
The author strikes out at the "same language on the server and client" claim, which I think is a bit unfair. one of the great things about node.js for me is that it is (mostly) js, so I can crank it open and understand what's going on - this is especially true for libraries. I know js pretty well (and most of the syntax hacks), so this is pretty straight forward. If I try and do the same thing with django or rails, then I find myself investing serious amounts of time just understanding the syntax (the splat operator is a good example). Using the same language (not necessarily the same environment) that you already know on the server does have genuine benefits, even if you do have to treat it differently.

Re: My gripes with JavaScript

#39
post #11
post #10

Earlier quoted context omitted.

Or use a tool that compiles js.next to lowest-common-denominator-javascript.

Yay a dynamic language with a compiler step.

Smalltalk, one of the seminal, dynamic languages has a compilation step. It happens inline everytime you save a method.

Lisp can both be dynamic and compiled.

Many dynamic languages---Python, Ruby, et all--on JVM or CLR have a compilation step. They compile to byte code that the VM then runs.

Re: My gripes with JavaScript

#40
post #26
post #21

The other problem I would see is obvious if you continue with something like the following logic: All successful languages passed through a phase in which they had a broadly similar list of problems. How did they escape from that phase? Because somebody had the power to move the language forward. Somebody (or small set of somebodies) could say "yes" to that idea and "no" to the other idea, and implement them, and hav…

The fact that everything you said is true makes JavaScript an even more amazing language. How many languages could survive 15 years without change and still remain relevant? And not only relevant, but expand their influence? Certainly this is mostly due to its unique position on the browser, but the language had to be flexible enough to fill that role and more. That's amazing .

Huh? It's the only language that works on browsers. That's how it got 'amazing'.
Post reply on HN