> All variables except those in the global scope are private, so you do not need underscore-conventions, simply do not declare the variable in the global scope! And when it comes to nodeJS modules, there are no global scope, all variables will be private unless explicitly exported. So instead of obj.__foo you just declare foo somewhere and it will not be possible to get or set it outside the module.Alright, I get you now. I agree with you on this that it does allow for that sort of encapsulation--but, IMO, that's a bad kind of encapsulation; having to put fundamentally object-oriented data outside of the object strikes me as a profound routing around serious linguistic damage.
> Since all variables are private (function) scoped in JS you do not have to worry about shadowing (overwriting variables), especially when your functions don't have any outside couplings, witch is possible with (common JS) NodeJS modules as modules can be required from within functions or methods. They are just like any variable.
This, OTOH, is pretty much the same as any language with any kind of encapsulation. Maybe ES modules have finally approached parity, but it's nothing special.
> What do you mean by transitive dependencies ? I don't think there's a concept of transitive dependencies in NodeJS.
Every dependency of your dependency is transitive. Just go look in the node_modules directory of any of your dependencies! If you require X and it requires Y and Z, bugs in its version of Y or Z are suddenly your problem. And its upgrade strategy becomes your problem, too.
OTOH, in something like Maven, saying "no, use my version of this transitive dependency" is very straightforward.
> If you spend one hour to fix a bug in a open source project, you have probably saved other people thousands of hours of work, money, or frustration.
And my client doesn't care. If I'm working on my stuff, sure, I'll do that if it's the most efficient way to solve my problems. My clients do not give a single shit about this, though, and I have to build things they can deal with, not me.
So this is at best a misfeature. Primarily a bug.