The inability to handle zero-byte buffers makes everybody’s life harder.
Zero. It’s a valid number. Please support it.
It's wild that zero isn't supported when everything is in 1s and 0s.
From the perspective of integrating and using such code, I think there are three possibilities that one usually needs to handle to cover the “oops, couldn’t produce the thing you wanted, sorry consumer” cases the author discusses, regardless:
1. Check for null (the author dislikes producing null, but that doesnt mean layers under their code might not produce nulls that the author’s code unintentionally propagates up to consumers)
2. Check for empty (the author prefers this)
3. Check for typed exceptions (I guess the author doesn’t cover this and I am surprised they don’t discuss?)
I appreciate the author’s take on why empty set outputs might be nicer, and that also fails to change the fact that they are just one cat and all the other library authoring cats out there will have divergent strong opinions that their implementations follow 🥲