📜 ⬆️ ⬇️

Javascript as a phenomenon



The nodejs community is crazy, and judging by the fact that in 2016-2017 in various ratings JavaScript took the first place in popularity, pushing out Java by a small margin - the madness of late has really become massive. It would seem - if you don’t want it, don’t eat, write on your favorite Elixir / Erlang / Lisp / Haskell / any other language with a good design and don’t blow, but in the current situation unfortunately this rule stops working and you have to make some efforts to comply .

What is the reason for the popularity of such a really fucking language like JavaScript? In principle, this is also the reason for the popularity of Java, and indeed almost all phenomena of culture and society. - in the bubble. When giants such as Facebook, Google, Microsoft and Twitter methodically pour multimillion dollars of bloody dollars into the JavaScript infrastructure, write frameworks, libraries, invent standards and architectures, it becomes really difficult to ignore. Such a strong infusion of dough causes rabid HYIP drive development. The employer wants to see React, Redux, Relay, Realm, Flux, Babel, Webpack / Grunt / Brunch, and a dozen more buzz words from our favorite corporations that I don’t even know. And all this is seasoned on top with a bunch of plug-ins for the same technologies, all varieties and colors from our beloved npm. Technologies from corporations in order for us to have technologies from corporations and a minified js-bandle weighing 15MB for a simple SPA, oh yeah.
')
At some point, the huge demand for development in a truly terrible language has generated a huge variety of sometimes rather strange JavaScript compilers from other, more acceptable languages. It is quite logical, the developers are tormented by the strongest cognitive dissonance (I want money, but I don’t want JS) somehow tried (and try) to reduce the pain of JavaScript development. Personally, I tried quite a lot of languages ​​from this list, for some time I wrote in CoffeeScript like languages, the most successful example of LiveScript is from the box curring, pipe, the absence of stupid brackets, semicolons, cycles and return s. I even tried PureScript - an example of compiling Haskell code (with immunity, monads and a wonderful system of strong types) in JavaScript. In fact, of course, all these languages ​​are not commercially demanded for obvious reasons - there are no millions of injections from corporations in infrastructure development. If there were any, I’m giving a tooth, everyone would have written all in Haskell and would tell each other while drinking a smoothie while spinning a spinner about new monads and applicative functors from Facebook.

It would seem that I shouldn’t care at all as a backend developer - let npm obscurantism be on the frontend, I’ve got the order here, kosher OTP just like in 1986. But it was too early to relax - they pulled the JS engine out of the browser to backend, and with absolutely serious facial expression. Indeed, it is one thing to write some SPA in this language, and some critically important billing is quite another. But JavaScript is now on the backend, great.


And I also keep quiet about the subjective view of personally annoying features such as mutability, curly braces, semicolons, return, the lack of uniform standards for working with data structures, the absence of macros, or any custom infix operators / functors.

In general, JavaScript is terrible whatever it may be, but it has a huge popularity due to the bucks and low threshold of entry. When you have a bundle of green bills in front of your nose, it’s hard to resist, but I hold on. Mental health is more expensive. By the way, I recently read about Facebook activity in the Ocaml language - so maybe there is a light at the end of the tunnel, but this is not certain.

Source: https://habr.com/ru/post/334760/


All Articles