HNHacker News
TopNewBestAskShowJobs

reactus

33 karma · joined March 8, 2023

submissionscomments
reactus··on It's not what the world needs right now
I didn't say that. Stealing $4k is bad, but I can't say I hate the guy for it. It's not like he ran into the store with a machine gun and murdered the clerk to get the cash in the register. Also the suit anecdote could have been made up anyways.
reactus··on It's not what the world needs right now
Several commenters here hate the writer, calling him "completely insufferable", "a character that the reader hates", or "a selfish, narcissistic jerk". But I didn't find him that bad? His worst crime was stealing a $4000 suit from Barneys New York.
reactus··on CommonJS is hurting JavaScript
> It's been absolutely awful for everyone.

It only became awful for me when people started publishing pure ESM packages; `npm i node-fetch` suddenly began resulting in broken scripts and I had to learn why. Prior to that, I happily used CJS outside of the browser and what I suppose is ESM in the browser (the `import` syntax provided by bundlers).

> a different spin IMO than a "advocated a moderate approach".

He said, "If your module target the Browser only, go for ESM. If your module target Node.js only, go for CJS."

This is moderate compared to the "Pure ESM" approach. The fetch API is built into browsers so I don't see why anyone would use `node-fetch` outside of Node.js, and yet the maintainers of `node-fetch` went Pure ESM anyway. Also that GitHub issue is titled "When will CommonJS modules (require) be deprecated and removed?" and his response was "There is no plan to deprecate CommonJS"[0].

0 - https://github.com/nodejs/node/issues/33954#issuecomment-776...

reactus··on CommonJS is hurting JavaScript
Would anyone be interested in an article about the crusade to move JS to ESM? I've been considering writing one, here's a preview:

Sindresorus wrote a gist "Pure ESM modules"[0] and converted all his modules to Pure ESM, breaking anyone who attempted to `require` the latest versions of his code; he later locked the thread to prevent people from complaining. node-fetch released a pure ESM version a year ago that is ~10x less popular than the CommonJS version[1]. The results of these changes broke a lot of code and resulted in many hours of developers figuring out how make their projects compatible with Pure ESM modules (or decide to ignore them and use old CommonJS versions)--not to mention the tons of pointless drama on GitHub issues.

Meanwhile, TC-39 member Matteo Collima advocated a moderate approach dependent on where your module will be run [2]. So the crusade is led not by the Church, but by a handful of zealots dedicated to establishing ESM supremacy for unclear reasons (note how Sindresorus' gist lacks any justifications and how weak TFA's justifications are). It's kind of like the Python 2 to 3 move except with even less rationale and not driven by the core devs.

0 - https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3...

1 - https://www.npmjs.com/package/node-fetch?activeTab=versions

2 - https://github.com/nodejs/node/issues/33954#issuecomment-924...

reactus··on React is holding me hostage
From the moment I understood the weakness of vanillaJS, it disgusted me. I craved the strength and certainty of unidirectional data flow. I aspired to the purity of Blessed Functional Programming. Your kind cling to fad frameworks and half-baked web components, as though they will not decay and fail you. One day the crude spaghetti code you call an "app" will wither, and you will beg my kind to save you. But I am already saved, for React is immortal...