3 ms·
As a (mostly) outsider, I’ve never understood why JavaScript is so popular in web dev circles. There are so many awesome compile-to-JS languages these days (Clo
by Oreb 7y ago
As a (mostly) outsider, I’ve never understood why JavaScript is so popular in web dev circles. There are so many awesome compile-to-JS languages these days (ClojureScript, PureScript, Elm, ReasonML, Scala.js, etc). What makes people want to use JavaScript instead?
- RussianCow 7y agoAny time you use anything non-native, you add layers of indirection and potentially lots of impedance mismatch between languages/runtimes. For instance, I know all of the ones you mentioned would be non-starters at my current job because it means we would have to wrap all of our JS libraries/APIs in the language of choice, which is a non-trivial amount of work. Plus, debugging becomes more challenging as you're basically having to do it at two levels simultaneously. Even with all of JavaScript's deficiencies, it's still far easier to just deal with them than to switch languages entirely.
- lagg 7y agoI too remember the time when we didn't assume there'd be a Makefile-ish system that has to bundle everything, compile the sass, pull bootstrap, etc. Then there's the map files for debugging that will generate cleanly every now and then. I've adapted but these strange abstraction languages are still where I'm drawing the line. At a certain point it's like, are you choosing the language for the project or is it the other way around. Hah, I just remembered Vala. Edit: Also this thread and the internet in general make me feel bad for liking javascript. It has issues with the global namespace being all wrecked when used for DOM, but the language in and of itself I just find cool for the same reason I find JSON and the way lisp treats objects/data/code cool. So many playa hataz :(
- wutbrodo 7y agoIt's permissiveness means you can hit the ground running more easily writing shitty but functional code, and web dev has long been the gateway for new entrants to engineering. People start programming, learn shitty habits from a shitty language ,and then the religious affinity for programming languages that many have starts to kick in. This obviously doesn't explain every Javascript fan, but the tendency is strong enough to shift the dynamics of the community. I can't say I relate to the religious fervor with which people defend programming languages. C++ is probably my favorite language to work in, but I absolutely understand where the hatred for it comes from. I readily admit that it's grotesque in many ways and my preference is likely for lack of sustained exposure to certain other modern languages.
- Splognosticus 7y agoProbably just because it's there--you can start writing JavaScript without installing anything, same as you used to be able to do with BASIC on 8-bit micros. Then when you consider how much Visual Basic or VBA code there must be in the world and why that is you can start to see how the JavaScript ecosystem is how it is.