4 ms·
You can also use C++, Java, Kotlin, C#, or almost any popular language. Compiling to JS is not an innovation its a hack and a testament to how terrible the lang
by Zergy 12y ago
You can also use C++, Java, Kotlin, C#, or almost any popular language. Compiling to JS is not an innovation its a hack and a testament to how terrible the language and ecosystem is.
- timepiece 12y agoIt's more of a testament of the intellectual laziness of some devs to pick up the language and put real efforts to master it.
- tobltobs 12y agoFollowing your logic, all "masters" should code in assembler?
- mastazi 12y agoNo major language implementation that I'm aware of compiles to assembly. Maybe you are referring to machine language and/or bytecode, which are not targeted at humans, so the 'masters' should not code in them because the 'masters' are humans. Advanced Javascript has many capabilities such as first-class functions and great introspection because of the way objects are. The fact that there is a lot of shitty js code around doesn't make js a shitty language, just like the tons of shitty C from our Commodore-64-childhood don't make C a shitty language.
- shabble 12y ago> No major language implementation that I'm aware of compiles to assembly. I believe 'gcc -S' would demonstrate not. If my understanding is correct, it produces essentially asm internally regardless of that flag, but subsequently assembles and links it without presenting it externally, -S just makes it stop and dump the asm. No idea about other C compilers, but it wouldn't surprise me if they have some similar feature.
- comex 12y agoCorrect. GCC always produces assembly and shells out to as; Clang originally did the same, but now goes straight from an internal representation to machine code by default, with the old behavior as a flag. Not sure about other compilers. In addition to being wrong, the parent's point is also incredibly nitpicky.
- mastazi 12y agoYes I've been reading a bit about GCC and yes, turns out I was very wrong. I'm sorry that my comment sounded overly critical, I was actually trying to defend JS and opposing the idea that somehow "we need to fix JS". Having said that, I can see why there exists a need for "compiling" from other languages to JS - the latter being the only alternative when it comes to running code in a browser - even though personally I consider it unnecessary overhead.
- vidarh 12y agoIt is very common not just for C compilers, but for a long range of other compilers. So common that it is unclear to me which of producing textual asm output or machine code is most common. Certainly there's been periods were the attitude was that producing machine code directly was unnecessarily complex and didn't belong in the compiler.
- scrollaway 12y agoMaking a conscious decision not to use an inferior language is far from laziness. It's a productivity-oriented decision.
- timepiece 12y agoNo one is forcing you to write in js. You can write in any language you want and then compile to js. Why you have such intense and strong feeling toward a programming language? It's just a programming language after all, nothing more nothing less
- scrollaway 12y agoI have zero feeling one way or another towards javascript as I made a conscious choice not to deal with it - I write Python and Lua for a living. Just like I made a conscious choice not to deal with PHP, I care very little what happens to PHP. You're very much the one with the "strong feelings" there, accusing "intellectual laziness" for not putting real efforts in a language which is simply not worth anyone's time - not to mention assuming that people who think the language is inferior actually use it. As I said, it's a productivity decision. The opposite of laziness.
- timepiece 12y agowhich is simply not worth anyone's time If you wanna do any consumer facing web stuff, you gotta code in js in one way or another. So, if you don't do any web stuff that's fine but other people doing any serious front or back end web stuff have to master the language to get the maximum out of their work. Anyway, good luck with your darling langs
- scrollaway 12y agoI very much work on frontend as well. I just use coffeescript or dart when I need to. You seem to be missing the entire point of pretty much all the comments, and you keep making more assumptions. You're 0 for 3, yet you're still acting smug. I'd take a look into that if I were you. Take this as general advice. Edit: I saw your comment below - I'm done replying to you directly, you're probably not a troll, but it's sad that you behave like one.