Re: Change -> to dot(.)

From: Date: Thu, 06 Jul 2017 06:29:02 +0000
Subject: Re: Change -> to dot(.)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-99785@lists.php.net to get a copy of this message
The dot is already the string concatenation operator. This would be a horrible migration process. The PHP team is never going to upset the developer experience that much for a purely cosmetic change. Also, C and C++ use the -> symbol, two major languages. Regards On 6 Jul 2017, 08:13 +0200, Khawer . <khaweronline@gmail.com>, wrote: > In all major programming languages we access object properties and methods > using dot(.). > > C#: > Abc Abc = new Abc(); > Abc.method(); > > Java: > Abc Abc = new Abc(); > Abc.method(); > > JavaScript: > var apple = new function() { > this.name = "Test"; > } > alert(apple.name()); > > > Why not to make PHP similar to these languages by allowing to access object > properties and methods using dot(.). We will still keep "->" until PHP 8 to > maintain backward compatibility.

« previous php.internals (#99785) next »