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.
I use modules for all the reasons. Your assertion that require() or importSync() represents a willful misunderstanding is silly and arrogant.