# wishlist item for 6.0.0

- Thread: https://externals.io/message/19331
- Original archive: https://news-web.php.net/php.internals/19331
- Started by Darren Horrocks on 2005-10-02T20:54:56+00:00
- Messages: 9
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #19331 — Darren Horrocks — 2005-10-02T20:54:56+00:00

URL: https://externals.io/message/19331#19331

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();

---

## #19332 — Petar Nedyalkov — 2005-10-03T06:43:41+00:00

URL: https://externals.io/message/19331#19332 · In reply to: #19331

> 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

---

## #19393 — Hartmut Holzgraefe — 2005-10-04T13:23:03+00:00

URL: https://externals.io/message/19331#19393 · In reply to: #19332

Petar Nedyalkov wrote:
> > […]
> 
> 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 ...

---

## #19431 — Stanislav Malyshev — 2005-10-06T09:14:39+00:00

URL: https://externals.io/message/19331#19431 · In reply to: #19393

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

---

## #19432 — Jani Taskinen — 2005-10-06T09:19:50+00:00

URL: https://externals.io/message/19331#19432 · In reply to: #19431

>
> 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

---

## #19434 — Kevin Waterson — 2005-10-06T09:34:33+00:00

URL: https://externals.io/message/19331#19434 · In reply to: #19431

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."

---

## #19507 — Sebastian Bergmann — 2005-10-08T08:36:14+00:00

URL: https://externals.io/message/19331#19507 · In reply to: #19432

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

---

## #19515 — Michael Crute — 2005-10-08T15:32:56+00:00

URL: https://externals.io/message/19331#19515 · In reply to: #19507

>
> Jani Taskinen schrieb:
> > […]
>
> $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?"

---

## #19516 — Marcus Boerger — 2005-10-08T15:56:09+00:00

URL: https://externals.io/message/19331#19516 · In reply to: #19431

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
