News for hackers. Stuff that matters.
Re:NPM and NodeJS should do more to make ES Modules easy to use by tqwhite on Friday June 21, 2024 @11:38AM (#40750699)
Your point is that modules has a conceptual underpinning. My point is that the actual world in not the same as that concept.

I use modules for all the reasons. Your assertion that require() or importSync() represents a willful misunderstanding is silly and arrogant.

Re:NPM and NodeJS should do more to make ES Modules easy to use by zarathustreal on Friday June 21, 2024 @09:34PM (#40755463)
My assertion is that, having been made aware of the pitfalls of effectful imports, continuing to argue for using them requires a willful misunderstanding.

People outside the context of this discussion could simply be uninformed, they don’t need to be willfully misunderstanding.

Re:NPM and NodeJS should do more to make ES Modules easy to use by tqwhite on Wednesday June 26, 2024 @11:06AM (#40800907)
No. It is a result of a practical, engineering perspective. I love theory. It's necessary for moving the world forward.

I also love getting things to work. Three quarters of NPM packages are CJS. Several of them are ones I wrote.

The reason they are not ESM is that the theoretically pure folks had control and I voted with my fingers because everything I do has to fit in my a substantial amount of existing CJS code.

Arguing for practical solutions that accommodate an imperfect world is absolutely correct.