Hey Yasuo,

> On 23 Jan 2015, at 00:07, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:
> 
> Ruby has it. Semantics is the same.
> http://ruby-doc.org/core-1.9.3/Comparable.html
> 
> PERL has it. Semantics is the same.
> http://perldoc.perl.org/perlop.html#Operator-Precedence-and-Associativity

Yep, and I mentioned as much. It’s also in Groovy, but it’s not as well-known a 
language.

> Python has similar "<>", but it only compares equality. (the same as !=,
> !==)

Actually, PHP also has <> (as do one or two other languages). I think it’s a 
relic of BASIC, which had = for equality and <> for inequality. I don’t think 
it’s used terribly much by the user base.

> MySQL has it. Different differs. It's for NULL comparison.
> http://dev.mysql.com/doc/refman/5.6/en/comparison-operators.html#operator_equal-to

Yeah, I’m aware of that. I think this is the one case that might cause 
confusion, since MySQL and PHP are used together so often. The manual could 
have a note on it, I suppose.

> There is no reason not to have it, it seems.
> I suggest to add Ruby/PERL operator link to the RFC.

Good idea, I’ve done that now (I chose a slightly better link for Perl). I’ve 
also linked to the Wikipedia article about the operator.

> I would like to name it other than T_SPACESHIP.

There’s a case for that possibly… I don’t think the fancy name hurts much. The 
syntax error output includes the token name, and it has the same name in some 
other languages. It wouldn’t be like Paamayim Nekudotayim, which is a name PHP 
and only PHP has ever used. 

Thanks.
--
Andrea Faulds
http://ajf.me/





--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to