top | item 14479822

(no title)

Safety1stClyde | 8 years ago

I program in Go and JavaScript, but don't enjoy it.

I assure you that JavaScript is an interpreted language, and it does not have arrays or integers. This is not a harsh statement but a factual one.

discuss

order

fenomas|8 years ago

The JS language as specified is interpreted and doesn't have ints or first-class arrays; the code run by the VM that runs Node.js code is compiled and runs on smallints and arrays and so on.

(Not sure if you already knew this, but if so, you're not being factual, you're being selectively pedantic to make something sound worse than it is. Lack of ints or arrays isn't a big factor in JS performance for non-pathological cases.)

(edit: reasons for downvotes are appreciated!)

baron816|8 years ago

There's plenty to not like about JS, but being interpreted and not having integers or arrays is not high on its negatives list. The little bit of good far outweighs the whole lot of bad.

If you don't enjoy JS, it's because you haven't taken the time to learn what's great about it and have gotten hung up on the stupid things other people do with it or you're copying their mistakes.

colbyh|8 years ago

> If you don't enjoy JS, it's because you haven't taken the time to learn what's great about it and have gotten hung up on the stupid things other people do with it or you're copying their mistakes.

oh come on now, it's perfectly ok for people to dislike a language for any number of reasons. I don't hate JS but I don't particularly enjoy it, and that could be said for a number of popular languages. it has nothing to do with "taking the time" to learn anything - some people just don't jive with JS and that's totally cool.

innocentoldguy|8 years ago

That last paragraph is a logical fallacy, because it posits that one's distaste for JavaScript could only come via ignorance. I will offer my own anecdotal experience to refute that assertion. I've been forced to use JavaScript since the 1990s, and have done significant amounts of work in Node for several companies. I dislike Node and JavaScript because JavaScript has a weak standard library, ugly syntax, is slow, is a pain to scale, and a pain to write complex code with. I will absolutely give credit to the Node community for improving JavaScript, in both speed and syntax, and admit that JavaScript is better now than it ever has been; however, so are most popular languages. Personally, I've removed JavaScript from my resume, and turn down jobs that use it. If I have to use it for some reason, I can, but right now, I typically avoid it altogether by using Elm, and real server-side languages on the backend. I can't speak for anyone else, but I know JavaScript and still don't like it.

xyzzy_plugh|8 years ago

I don't know, I rank not having integers pretty high on the list of faults. Wasn't there just a huge debacle with node being unable to represent inodes properly?

Others|8 years ago

I think you're in the right here, but that's a little too far. I don't enjoy programming in JS, because I really like strong typing. And that's ok. You seem to be implying that everyone who doesn't like JS is deluded or arrogant, but that's not the case.

Safety1stClyde|8 years ago

> There's plenty to not like about JS, but being interpreted and not having integers or arrays is not high on its negatives list.

We are having a discussion is about programming language benchmarks.

A benchmark in this case is a measure of how fast a computer program can run. A computer program is a series of instructions for a computer. These instructions are written in something called a programming language. A programming language which is interpreted is inherently slower than a programming language which is compiled to assembly language. A programming language which does not have integers but must represent all numbers as floating point numbers is inherently slower than a programming language which has integers. A programming language which does not have arrays, but must represent arrays using hash tables, is inherently slower than a language which does have arrays. Thus, Node.js, which is interpreted and does not have arrays or integers, would be expected to be have much lower benchmarks than Go's, and yet node.js has exceptionally high performance.