Skip to content

Comment on The Micro PHP Manifesto's Missing Tenetparent

Comments

Node.js and npm made a pretty vicious, backwards compatibility breaking change in its symbol loading algorithm in the move from 0.3 to 0.4. It was a weird and frustrating blip for those who were programming for node before that. What they now do with dependency management is pretty genius, since 0.4. Dependencies are installed locally to the package that depends on it, not globally on your system, and can be fulfilled recursively. Say you depend on Package B.1 and A.2, B.1 can simultaneously depend on A.1 and everything works out fine. It's perhaps the most interesting approach to the dependency problem I've seen (and, unfortunately, a system that couldn't be replicated in PHP without really shaking the foundation). (edits)

I don't doubt it's gotten better, but it's a bit of a case of 'once bitten twice shy' with me. I may come back at some point, but I've no pressing need atm to be playing with node.

It's definitely bloody on the bleeding edge :)

Here's a link to the node_modules loading algorithm since v0.4, if you haven't checked it out, it's worth the quick read: http://nodejs.org/docs/latest/api/modules.html#loading_from_...

This module loading algorithm is what opens the door for npm to install nested dependencies in recursive node_modules subdirectories.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.