fs: Revert throw on invalid callbacks by MylesBorins · Pull Request #12976 · nodejs/node (original) (raw)

people have had fair warning?

@Fishrock123 in some circumstances I would agree: when the changes are desperately needed and can only sufficiently be addressed by core. In this case, there are other paths forward that don't include breaking behaviour that userland relies on. Though it wasn't explicitly documented, optional callbacks are common enough that users did rely on that behaviour.

I agree that Node.js should help users write better and safer code as @jasnell pointed out, though I would add the caveat this should only be done if it can be a minor/patch release, saving breaking changes for exceptional circumstances. In recent history, I know of two exceptional conditions where I personally would reluctantly agree (as a passive onlooker) with a decision to break userland:

  1. Compatibility (not necessarily support) for ES6
  2. Fixing APIs where there are known proof-of-concepts for exploits in the wild that affect a significant portion of userland

To my knowledge, this isn't (2).

In both of the cases above, giving an ample window for feedback and shipping irrespective of cost is valid as the reward to userland is greater than the cost. I'm not convinced this is the case here.

In a much lighter spirit:

But, Mr Dent, the plans have been available in the local planning office for the last nine months.
-- Douglas Adams