wishlist item for 6.0.0

php.internals

Darren Horrocks

20 years ago
proper scopes for global, classes and functions. will allow for local variables for functions and classes without having to use $this->foo in classes and will allow for a more c/c++ like classes. also, being able to call up the inheritance by using ParentClass::bar();

Petar Nedyalkov

20 years ago
On Sunday 02 October 2005 23:54, Darren Horrocks wrote:
> proper scopes for global, classes and functions. > will allow for local variables for functions and classes without having to > use $this->foo in classes and will allow for a more c/c++ like classes.
I think this will pollute the namespace a lot and may lead to spaghetti code problems.
> also, being able to call up the inheritance by using ParentClass::bar();
This has already been implemented. Check: http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php
-- Cyberly yours, Petar Nedyalkov Devoted Orbitel Fan :-) PGP ID: 7AE45436 PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436

Hartmut Holzgraefe

20 years ago
Petar Nedyalkov wrote:
>> proper scopes for global, classes and functions. >> will allow for local variables for functions and classes without having to >> use $this->foo in classes and will allow for a more c/c++ like classes. > > I think this will pollute the namespace a lot and may lead to spaghetti code > problems.
When reading C++ code it's usually rather hard to determine whether a given variable is a member of the class, one of its parent classes, the local context or something global. So i'm all for keeping the $this-> prefix even though it adds some extra typing ...

Stanislav Malyshev

20 years ago
HH>>So i'm all for keeping the $this-> prefix even though it adds some HH>>extra typing ... Just a thought - we could have compromise solution, i.e. some syntax sugar to mean $this->foo - for example $.foo or something like that. This way we have clear visual difference between locals and properties and at the same time save a lot of $this-> typing. Of course, the downside is that you coudl type $. accidentally :)
-- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115

Jani Taskinen

20 years ago
On Thu, 6 Oct 2005, Stanislav Malyshev wrote:
> > HH>>So i'm all for keeping the $this-> prefix even though it adds some > HH>>extra typing ... > > Just a thought - we could have compromise solution, i.e. some syntax sugar > to mean $this->foo - for example $.foo or something like that. This way we > have clear visual difference between locals and properties and at the same > time save a lot of $this-> typing. Of course, the downside is that you > coudl type $. accidentally :)
And make the scripts even harder to read? No thanks. $this->is_fine. --Jani

Sebastian Bergmann

20 years ago
Jani Taskinen schrieb:
> $this->is_fine.
$me->agrees();
-- Sebastian Bergmann http://www.sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69

Michael Crute

20 years ago
On 10/8/05, Sebastian Bergmann <sb@sebastian-bergmann.de> wrote:
> > Jani Taskinen schrieb: > > $this->is_fine. > > $me->agrees(); > >
Count me in for $this->way. It just makes more sense and is far easier to read. -Mike
-- ________________________________ Michael E. Crute Software Developer SoftGroup Development Corporation Linux, because reboots are for installing hardware. "In a world without walls and fences, who needs windows and gates?"

Kevin Waterson

20 years ago
This one time, at band camp, Stanislav Malyshev <stas@zend.com> wrote:
> HH>>So i'm all for keeping the $this-> prefix even though it adds some > HH>>extra typing ... > > Just a thought - we could have compromise solution, i.e. some syntax sugar > to mean $this->foo - for example $.foo or something like that.
$.foo spurns directly from HELL Kevin
-- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote."

Richard Mann

20 years ago
HH>>So i'm all for keeping the $this-> prefix even though it adds some HH>>extra typing ... Socond that also. I see no reason to change this for the sake of typing 6 characters.
> > -- > Stanislav Malyshev, Zend Products Engineer > stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php
==================================================================== Richard Mann (Programmer) -= Skynet Internet Services a: 8 Premier Court Boarden Close Moulton Park Northampton NN3 6LF -= t: 0845 1 20 65 90 (General) t: 0845 1 24 44 00 (Sales) f: 0845 1 20 65 91 w: http://www.sky.net.uk/ -= D I S C L A I M E R Statements and opinions expressed in this e-mail may not represent those of the company. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender immediately and delete the material from any computer. ====================================================================

Marcus Börger

20 years ago
Hello Stanislav, $.this_is_ridiculous, as in $.this != $this marcus Thursday, October 6, 2005, 11:14:39 AM, you wrote: HH>>>So i'm all for keeping the $this-> prefix even though it adds some HH>>>extra typing ...
> Just a thought - we could have compromise solution, i.e. some syntax sugar > to mean $this->foo - for example $.foo or something like that. This way we > have clear visual difference between locals and properties and at the same > time save a lot of $this-> typing. Of course, the downside is that you > coudl type $. accidentally :)
> -- > Stanislav Malyshev, Zend Products Engineer > stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115
Best regards, Marcus