defense-of-dot-js icon indicating copy to clipboard operation
defense-of-dot-js copied to clipboard

proposal: assume ideal future world, backwards compatibility "exercise for the reader"

Open jokeyrhyme opened this issue 8 years ago • 2 comments

Makes me wonder whether Node 7 (or 8, whichever introduces these changes) should ship strictly with support for module syntax .js files and nothing else. Just ship our ideal future state and ignore the past.

The community can still monkey-patch global.require() at runtime to bring back support for script syntax (assuming there's sufficient plumbing for this), and can experiment with whatever package.json or extension conventions they think will fly. So backwards compatibility is an "exercise for the reader".

This is probably a bad idea, of course, just be looking at our previous io.js fork not to mention the Python 2 to 3 problem. But it seems like the current .mjs decision, which I'm personally okay with, has a "decision made by someone else, ruining my day" problem with the broader community. /shrug

Cross posted here:

  • https://github.com/nodejs/node-eps/pull/3#issuecomment-218574667

jokeyrhyme avatar May 11 '16 20:05 jokeyrhyme

@jokeyrhyme

proposal: assume ideal future world, backwards compatibility "exercise for the reader"

-∞ See this comment

[...] has a "decision made by someone else, ruining my day" problem with the broader community.

Care to elaborate? I'm not seeing it outside a particularly vocal minority.

dead-claudia avatar May 11 '16 22:05 dead-claudia

It's so trivial to add a require() hook to your entry point these days, and I have seen a few apps with the babel hook. A breaking change like this would certainly spell doom for poorly-supported developer tooling, but is unlikely to have any impact at all on production systems (because you'd add the compatibility hook before you updated Node.js).

But yes, already on board with this being a bad idea. :D Just figured having some really terrible ones in the mix would make the others shine more. :P

Care to elaborate? I'm not seeing it outside a particularly vocal minority.

I'm unscientifically assuming the defence-of-.js readership is a superset of the node-eps readership. So, technically "broader" fits. /shrug

jokeyrhyme avatar May 11 '16 23:05 jokeyrhyme