3 ms·
I don't hate node However, the tools around using Node and JS are inferior to other languages (C/C++, Java, C#, even PHP and Python). Further, the language do
by jmspring 14y ago
I don't hate node However, the tools around using Node and JS are inferior to other languages (C/C++, Java, C#, even PHP and Python). Further, the language doesn't have the cleanest history in terms of design, so in a project with multiple people on it, you are leveraging coding guidelines, linters, and the like to have any real consistency.
A colleague raised an interesting question which I will paraphrase -- given the desire to build a project that exposes webservices from the ground up, what language would you choose?
My first response was, it depends on the platform. If you are using Azure, for instance, C# is the first class candidate, Node and other languages are tier 2/3. EC2, sky is the limit. Heroku, probably start with Ruby. If all things were equal, I would personally choose Python over Javascript.
Python and Twisted give a lot of the same benefits as Node in terms of async development. Python is more consistent and has a more mature (and featureful) standard library. Node and modules are plentiful, but a lot (even socket.io) still show some signs of being young.
For me, the choice is - right tool for the platform, group, and project you are working on. Personally, I will err towards the more mature when you are talking about scripting languages. (PHP doesn't count, it's super easy and I've used it a lot, but I always feel dirty afterward :) )
- deleted 14y ago[deleted]
- wpietri 14y agoIt often happens. E.g., when you are starting a new project on your current infrastructure. Which is where most new projects happen.
- jmspring 14y agoIf you are working at a bigger company, sometimes there is a "standard platform" for the company. I was just covering multiple scenarios.
- fletchowns 14y agothe tools around using Node and JS are inferior to other languages (C/C++, Java, C#, even PHP and Python) You are comparing a language that is like 2 years old vs languages that are pushing 20 years old. the language doesn't have the cleanest history in terms of design It is certainly no worse than several of the languages you just listed. Personally, I will err towards the more mature when you are talking about scripting languages. Psssst, JavaScript is a year older than PHP.
- jmspring 14y agoJavaScript for server side is much younger than PHP, yet inherits the client side warts. :)
- niggler 14y agoGoogle, through Closure Tools, and other groups and people have built tools around javascript. For example, JSHint is a pretty good linter and fixjsstyle is a nice little tool to fix formatting. Certainly JS isn't as amenable to static analysis as C, but with time we'll see more.
- jmspring 14y agoWhat you outline is my gripe. Typical NodeJS dev setup amongst those I know: Sublime JSHint JSFormat (or fixjsstyle) To get code to some basis of style consistency. Debugging - node-inspector or console.log In the last six months, node-inspector has gotten a lot better, but a lot of times inserting console.log is just faster (mmm...printfs).
- niggler 14y agoIn many ways it parallels what people do in C: until you get to the scale where precise logging and style enforcement matters, you just forge ahead in the path of least resistance. So like you said, they printf or console.log, use lint or jshint, use -Wall or "use strict" etc. Btw I prefer console.error :)