Hacker News new | past | comments | ask | show | jobs | submit login

I like to think of it this way: Some languages allow you to shoot yourself in the foot easier than other languages, given the context and environment.

Abuses and problems precisely show Javascript's defects. The more easily abusable a language is, the more defective it is.

A lot can be said about familiarity with the language. Many examples in wtfjs.com boils down to (mis)understanding the language itself. Let's call this the cognitive overhead of a language - the amount of corner cases you have to store in your head about a language.

Surely a language with high cognitive overheads is more abusable than languages that have low cognitive overheads.

Incompetent python, C, or even scheme programmers wouldn't be able to shoot themselves in the foot (by shooting themselves in the foot, I mean having unexpected results - even with Undefined behaviours) as much as incompetent javascript programmers. That's my beef. I currently have no way of empirically proving that, but my gut is leaning that way.




You are 100% wrong. C allows you to shoot yourself in the foot much more easily and much worse than JavaScript. JS is a far more "safe" language to code in.

No pointers, no memory allocation. Yeah JS isn't typed but the problems that you get into with that are nothing by comparison.

And again, I'm not saying JS doesn't have problems, it does. But the problems this presentation is complaining about are not results of flaws in JS they are results of incompetent developers.

So he's complaining about the wrong thing by complaining about JS.

It should be titled "I wish incompetent people wouldn't try to do things." And we'd all agree but then consultants like him would be out of a job.


FYI, Nicholas Zakas, the person who gave this presentation (which I attended) is a well-known JavaScript expert. He's definitely not complaining about JavaScript as such, just horrible misuses of it.


> No pointers, no memory allocation.

You mean no manual pointer management, no manual memory al location, right? Right?

> Yeah JS isn't typed but the problems that you get into with that are nothing by comparison.

Js is typed. Every language is typed. Is just isn't statically typed. Big difference.

>You are 100% wrong.

Strong words for someone who gets a lot of basic stuff wrong in a single paragraph.


That's semantics. He didn't get the "basic stuff wrong in a single paragraph" at all. Bu not having to worry about pointer or memory allocation at the the point of coding, it is entirely reasonable to say that JS the language has none. Yes, of course the interpreter does that, it goes without saying. JS is weakly typed, when writing no type declaration is needed, so it is said that JS isn't typed. Your comment is akin to that of a grammar pedant by not addressing the argument, just the manner in which the points were made.


>> No pointers, no memory allocation.

There are definitely both of those things, they just aren't explicit in the same way.[1]

[1]: http://point.davidglasser.net/2013/06/27/surprising-javascri...


The parent probably shouldn't have included C and Python in the same list but if you apply the principle of charity[1] and choose Python as the point of comparison rather than C, then his argument is somewhat stronger.

[1] http://en.wikipedia.org/wiki/Principle_of_charity


You speak very confidently about a language you already admitted you refuse to use. And your heuristic of "the more abusable a language is, the more defective it is" is completely nonsensical.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: