extra icon indicating copy to clipboard operation
extra copied to clipboard

Deprecate unnecessarily partial functions

Open josephcsible opened this issue 6 years ago • 1 comments

We should deprecate replace and splitOn, and create alternatives for them that take a NonEmpty instead of crashing at runtime when their first parameter is empty.

josephcsible avatar Feb 17 '20 20:02 josephcsible

While it is would be nice if they were pure, syntactically writing a NonEmpty, especially for a String is cumbersome - often the first arg is a constant. Perhaps safe variants should go in the List.NonEmpty.Extra, then people can pick their poison.

ndmitchell avatar Feb 21 '20 07:02 ndmitchell