RE: [PHP-DEV] namespace separator poll, update
| From: | Ford, Mike | Date: | Mon, 28 Nov 2005 14:17:46 +0000 |
| Subject: | RE: [PHP-DEV] namespace separator poll, update | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-20722@lists.php.net to get a copy of this message | ||
On 28 November 2005 09:50, Stanislav Malyshev wrote:
> > > BUT the discussion is not only about possibility but also about
> > > what you would like. The ":" for example would work if mandatory
> > > whitespace would be introduced for the ternary BUT this is very
> > > very bad.
>
> If my vote is counted (not that I asked for it :) then I vote against
> all funky syntax, present and future. :: is only thing that is
> obvious and somehow connected to the world of PHP as we know it now.
Wow! I go home early on a Friday, and come back to a veritable php-dev flood in my Inbox! That must
be the most active weekend since I started reading the list!!
My point of view is similar to Stanislav's: any operator chosen should have some echo of
existing syntax -- this rules out the original suggestion of \ and many of the suggested
alternatives. I'm also completely against any solution that introduces new enforced
whitespace, however unlikely the construct -- that just doesn't seem like "the PHP
way".
The two existing "class to member" operators are :: and ->, so I'd be looking at
analogues of these. I'm not keen on :: itself performing double-duty here, and I hate ::: and
most of the repeated-character suggestions (%%, ..., **, etc.) -- especially as the single-character
versions all have completely unrelated meanings.
This leaves me looking for something not dissimilar to ->. It's a shame that => is
already taken, as that would have done nicely. :> (or ::>), despite their smiley-ness, are
actually quite clever suggestions, containing echoes of both :: and -> -- I'd be ok with
either of these. Another possibility I haven't seen offered, and that has strong echoes of
->, is ~>. I can't see any conflicts here, it's sufficiently similar to be
obviously related, but sufficiently different to be easily distinguished.
What do people think?
(Space for flame here...)
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm