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 đĽ˛