> Since frameworks already have things like Strings::is_stringable() and 
> Arr::arrayable(), I'd suggest to use is_floatable(), is_intable() or 
> is_integerable(), etc.
> To me, this would also feel more consistent is is_float(), is_int(), etc.

I get what you mean. Naming is definitely challenging here. However,
with alternatives like "is_floatable()", I'm afraid that it is not
clear enough that there's a potential loss of precision. I would
personally feel that "is_floatable()" would mean "can this be cast to
float?" without further "limitation".

Best,
Alexandre Daubois

Reply via email to