Re: Re: Interfaces name "Interface", was: [PHP-DEV] Re: Idea for namespacelookup resolution
| From: | Markus Fischer | Date: | Tue, 01 Jan 2008 00:01:03 +0000 |
| Subject: | Re: Re: Interfaces name "Interface", was: [PHP-DEV] Re: Idea for namespacelookup resolution | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34312@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi, second time me ...
Markus Fischer wrote:
> Hi Greg,
>
> Greg Beaver wrote:
>> It is technically possible to fix this, on first glance it would involve
>> having the lexer return a T_STRING for any non-whitespace following
>> T_INTERFACE or between T_IMPLEMENTS and '{'. It would also need to
>> return T_STRING following T_INSTANCEOF.
> [...]
>> accepted, it's a fair amount of work to patch the lexer and make sure it
>> doesn't break crap.
>
> I'm totally with your here. I can live very well with "Iface" instead.
> Just wanted to make sure it's not an oversight on my side. Thanks for
> the (gory) details ;)
I think one has really get used to this, if you take for granted that
you named classes/interface this way in the past.
For example, in many projects I use the observer pattern and one of the
first observers implemented in almost any project is the Echo-Observer
to simply echo the messages. So this doesn't work anymore either.
a) You can't make a class Echo and
b) you can't create an interface named Echo ...
I tried using print but that doesn't work either. I'm either bumping
into T_ECHO or T_PRINT. Stdout finally did it.
- - Markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHeYK/1nS0RcInK9ARApRiAKC63DhPeLY7i+QwApr/Iv4tyz4ToACgg995
uYHKxO/ToyeKxmqqXnK9RqU=
=JARy
-----END PGP SIGNATURE-----