4 ms·
These subtle JS rants every other day are kind of annoying. Comparing JS to Perl gives a new but still wrong angel on an old tedious discussion. JS weaknesses
by tferris 14y ago
These subtle JS rants every other day are kind of annoying. Comparing JS to Perl gives a new but still wrong angel on an old tedious discussion.
JS weaknesses are overrated: anybody can grasp all quirks within an hour and after few days you get used to them (besides there just a few and great standard libs like underscore making JS a rock-solid base) and JS' bad parts won't stand in your way anymore. Those who aim for perfection won't get shit done anyway. They look for the academically structured Rails apps (or replace with any other bloated framework) with half a second respond times and breaking after every 0.0.1 update of Rails. In my view JS is damn perfect and I can think of anything better right now. JS and its ecosystem (especially the awesome npm) gives you anything to write elegant, well maintainable code bases ten leagues higher than any script language like PHP and on the same level like Ruby or Python.
JS is not a hack written in ten days. JS is a wonderful and modern language, more innovative than most other language out there, it's a masterpiece of a language. People complain because it's different: it doesn't follow the traditional OO, there're no strict monolithic frameworks which teach them how to structure code and most are just overwhelmed with functional programming and event loops/call backs/asynchrony because they were just used to something different. This is not being arrogant it's just that people don't like change or hoping all the time for something better instead of being happy with what they have now.
You can create and maintain very large code bases in JS without any Coffee or other layers of abstraction (there enough examples out there). Most people are just not used anymore to think theirself about structuring code since there was always somebody who did the job for them (Rails, Django, etc.).
You don't need to compile to JS -- JS is also not the new assembly of the net because hundreds are building weird languages on top providing useless syntactic sugar and again old-age OO, it's already a very high level language allowing you to do ANYTHING and structuring you code exactly as want. Nothing will stand in your way.
And Javascript is so fast, you get C class performance with a dynamically typed language. No need to compile after every single change or deploys are fast and easy without sending huge binaries to the servers. There's no other language providing this speed for such little cost, no other.
To understand JS' beauty and to get the "flow" you have with other languages and you do not get with JS you have to do two things: invest time and try to forget what you learned. And if you still don't get there spend more time with JS. It's not JS which failed.
JS haters and other downvoters: not agreeing != downvoting
- to3m 14y agoIt might just depend on one's previous experience. I've not been very impressed with Javascript the language. I've been a C++ programmer for years, so I'm well practised at being happy with what I have now rather than wishing for something better. But I find it difficult to be happy with a language that doesn't have proper block scope and won't even check function arity. (Dear computer, stop being so damn lazy.) But, sadly, it fills a hole that nothing else does.
- tferris 14y agohttp://www.quora.com/Why-was-JavaScript-designed-without-block-scope http://www.quora.com/Why-was-JavaScript-designed-without-blo...
- tensor 14y agoThe problem with Javascript came when it started to be used server side. Suddenly, comparing with other languages that one can use instead is fair game. Sure, Javascript may not be as bad as perl or php, but it's got plenty of warts. On the server, why use javascript when you can use a language without warts? As fast as C? Not remotely close: http://benchmarksgame.alioth.debian.org/u32/benchmark.php?test=all&lang=v8&lang2=gcc http://benchmarksgame.alioth.debian.org/u32/benchmark.php?te... Usual disclaimer about micro-benchmarks applies, but I suspect the real picture is even worse. Speaking of compiling down to Javascript, languages like Coffeescript came about because of Javascripts warts, not because it's such a great language. Again, you can program in straight Javascript, but why? Because it's all you know? I need to forget better solutions exist to like it? Thanks, but I'll pass.
- peteretep 14y ago> JS is a wonderful and modern language Could you explain what you consider to be wonderful and modern about it? My view is it's Just Another scripting language with a weird OO model. I'm specifically interested in the features you think it offers that other scripting languages like Ruby, Perl and Python don't have, which make it modern and wonderful. > more innovative than most other language out there Could you give an example of this? > most are just overwhelmed with functional programming and event loops/call backs/asynchrony because they were just used to something different. Javascript allows you to have a simple form of anonymous function. Is this what you mean by "functional programming"? Do you feel Javascript's implementation of this is superior to how other languages do it? It's kind of sounding a bit like you think NodeJS invented event-driven programming... > You can create and maintain very large code bases in JS without any Coffee or other layers of abstraction You can do this in any language, and there are enough examples out there. That doesn't mean that it's necessarily what the language encourages. I've found Javascript considerably more difficult to organize code in than Haskell or Erlang or Perl or Objective C ... actually, harder than most things. > Most people are just not used anymore to think theirself about structuring code since there was always somebody who did the job for them (Rails, Django, etc.). You ... how long have you been programming for? > it's already a very high level language allowing you to do ANYTHING and structuring you code exactly as want. Nothing will stand in your way. I think this is definitely the first time I've understood the relationship between Javascript and ZOMBOCOM. > And Javascript is so fast, you get C class performance with a dynamically typed language. And it's about now that this start to sound like satire...