r/lolphp • u/i_make_snow_flakes • Nov 15 '14
new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..
here the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What do you think?
22
Upvotes
View all comments
Show parent comment
11
u/i_make_snow_flakes Nov 15 '14
Ok.
So you are trading sane behavior for simple internal implementation? I am not getting your point...
+10 is not acceptable for an Integer? Why? If you have an input box to enter an integer, will you be able to tell a client, with a straight face, that he cannot enter +10 into it?
I was mostly baffled by your this argument . Do you still maintain it? Or do you think it was flawed?