Hacker News new | ask | show | jobs
by ascotan 3643 days ago
Javascript is a bad language. Function scope. Terrible type system. Lack of native integers. Oh and btw this:

alert((![]+[])[+[]]+(![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]);

which is should be a dead giveaway that something is terribly wrong here. It was never designed to have a standard library for instance. The author alludes to this fact as being a problem for nodejs that go/ruby doesn't have. Whenever I write a lot of front end code and then have to transition to writing backend code I realize how much my brain has melted trying to think in javascript.

1 comments

If we follow your logic, assembly would the worst language of all.

Like you said it was never designed to have a standard library and so forth, and therefore it sucks to use JS to do a lot of things.

However I was just saying I don't think it's fair to say something is badly designed because it's bad at doing things it wasn't designed to do. The interpretation of whether having a functional scope is good or bad is also subjective IMO, depending on context.

But anyway if your takeaway from my comment was just this, you didn't get my real point at all. I don't really care about whether javascript is a good language or bad language. My real point was this whole disaster is caused not just by javascript alone.

Remove bad and good from the discussion. JavaScript exists at a place where high level languages are expected, not assembly. JavaScript lacks the productivity enhancements of other high level languages. No standard library and poor debugging as well as loads of quirks. JavaScript, standalone, is far lass productive on a theoretical basis (I say theatrical because no language can take JSS spot in the browser due to enternchment) because of this than other high level languages.

Also, JavaScript was barely designed. Saying it was designed to not have a standard library is revisionist history. It just doesn't have one, and everyone with influence over JS continues to make poor excuses as to why it continues to not have one.

I never said "it was designed to not have a standard library". Instead it was: "it was NOT designed to have a standard library", which means "standard library" was something that the creator didn't even think Javascript will need.

Javascript was only created to make web pages more dynamic when web pages, and nothing more. Back then browser was supposed to be just a "thin client" to access everything magically and only way to keep things locally on the browser was through cookies.

That's not the case anymore and web browsers became a monstrous software that does everything, and that's why we're even talking about "libraries".

Also you say "JS continues to make poor excuses as to why it continues to not have one", but that's exactly what the ES6 is trying to do, with classes, inheritance, etc. I personally do not like that direction, but hope that makes you happy.

Yes, I've been developing websites since before JS existed, so it does in fact make me happy that JS has made some progress related to developer productivity in 20 years. Are they adding other baggage? It seems so, but the addition of a standard library is a things well past its time.