Re: [VOTE] [RFC] Alphanumeric Decrement
On 21/01/14 19:12, Yasuo Ohgaki wrote:
Added this RFC to keep track inconsistency.
https://wiki.php.net/rfc/comparison_inconsistency
Python/Ruby does not even have ++/--.
Mixing string and number raises type error for these languages.
Perl returns -1 for string-- always.
Although behavior became more consistent than now, but
I'm not sure if this change is good or not.
Keeping current behavior might be better.
This would also be my preferred approach. My RFC is one approach to resolving the inconsistency, but it's not what I really want, in truth. I'd like something like that you're proposing.
However I think type juggling is entirely misguided, and should we do it at all, int -> string and float -> string should be one-way conversions. Doing the reverse seems like a bad idea to me.
--
Andrea Faulds
http://ajf.me/
Thread (19 messages)