Thursday 26 April 2018

Things I like about node

Here are some of the things that I think makes node amazing compared to other languages. If anybody would be so kind, I'd be interested to know why other languages don't have these things... or why these things aren't actually as great as they seem.Local DependenciesInstalling dependencies in an arbitrary system folder seems ridiculous and I don't know why any package manager ever did this. I understand why it sometimes makes sense, but the fact it's the default for other scripting languages like python is ridiculous.No Namespace PollutionIn node, when I require a file, I assign it to a variable. In almost every other language I import a package... then call something of a completely different name. When reading someone elses code I often have no idea where the code for a function call is.Explicit CodeNode, and the majority of popular packages do nothing by default. So my application starts as a blank page, then does only what I tell it to. Compare that to php, where a default server config is doing 1000 things, 990 of which are completely unnecessary and likely introduce vulnerabilities. Or Django, where my code is basically a plugin and the actual application is basically Django which does 1000 things.AsyncCallback hell is a myth. Async is so embedded in node, and works so well.Less is MoreOther languages seem to implement the same solution to simple problems many times. Node doesn't. For example Java has/had many dictionary type objects... half of which are deprecated. Simple things like http, which should be a standard in all languages often aren't... then there's 50 different packages you have to choose from. Node has many options for packages, but the standard libraries cover all the basics really well and don't have multiple versions of the same thing.

Submitted April 26, 2018 at 06:48PM by Buck_Da_Duck

No comments:

Post a Comment