Re: . period for Class Syntax references
| From: | php at karsites dot net | Date: | Sun, 20 Mar 2005 22:45:24 +0000 |
| Subject: | Re: . period for Class Syntax references | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-15516@lists.php.net to get a copy of this message | ||
Thankyou for your quick replies Derick and Jason.
I've taken a look at the link below - but I don't want to
make any non-standard changes to the php engine - If it's
working, don't 'fix' it! I want my code to be portable as
well!
I agree with Andrei Zmievski's point of view though.
It's a shame it could not be implemented as a standard
feature of php zend engine.
Regards - Keith Roberts
On Sun, 20 Mar 2005, Jason Sweat wrote:
> To: "php@karsites.net" <php@karsites.net>
> From: Jason Sweat <jason.sweat@gmail.com>
> Subject: Re: [PHP-DEV] . period for Class Syntax references
>
> On Sun, 20 Mar 2005 22:09:54 +0000 (GMT), php@karsites.net
> <php@karsites.net> wrote:
> >
> > Hi all.
> >
> > I don't know if this has been implemented yet.
> >
> > Is it possible to make the '.' period character act
> > place of the '->' character pair in class references,
> > without conflicting with the '.' concatenation character?
> >
> > Possibly would have to implement the two styles of
> > referencing to allow for backward compatibility?
> >
> > So, instead of writing: $this->my_var, one could then write
> > $this.my_var, which would be alot more in common with other
> > OOP languages.
> >
> > Maybe it's me, but I find it alot easier to read and
> > pronounce '$this.my_var' == $this dot my_var,
> >
> > than something like
> >
> > '$this->my_var' == $this right-arrow my_var
> >
> > Or, even some other single character that may be used
> > instead of the '->' pair. Any suggestions please?
> >
> > Regards - Keith Roberts
>
> Very dangerous to the long term maintainability of your code, but you
> could look at:
> http://www.gravitonic.com/software/php/ (near the bottom of the
> page)
> which links to
> http://www.gravitonic.com/software/php/patches/ze2_concat_obj_op.diff.gz#ÏФ9p1
> Lfhª’N
>
> Regards,
> Jason
> http://blog.casey-sweat.us/
>