Data.String.null
dbushenko opened this issue · 5 comments
dbushenko commented
Please check if variable s is not null before calling s.length
LiamGoodacre commented
I'm not sure this should be done.
I wouldn't advise passing null around pretending it's a string.
If a null check is added here, it'd be inconsistent not to check on every function.
The function Data.String.null is a check for if a string is empty, nothing to do with JavaString null.
paf31 commented
Agreed, a null string as input is a sign something is wrong elsewhere.
garyb commented
Another 👎 - the value should be a Nullable String or read as a Maybe String or something before reaching the functions in here most likely.
sharkdp commented
I believe this can be closed?
paf31 commented
Agreed, thanks.