# namespace separator poll, update

- Thread: https://externals.io/message/20722
- Original archive: https://news-web.php.net/php.internals/20722
- Started by Ford on 2005-11-28T14:17:46+00:00
- Messages: 6
- 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

---

## #20722 — Ford — 2005-11-28T14:17:46+00:00

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

> > […]
> 
> 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

---

## #20729 — Ron Korving — 2005-11-28T16:24:13+00:00

URL: https://externals.io/message/20722#20729 · In reply to: #20722

wow, I like foo~>bar~>obj->method()
I love ':' best, but if that really can't be, I must say '~>' looks pretty 
cool to me, cute even, like a little fishie ;)

anywaaay.. the best alternative to ':' i've seen so far, and i doubt it'll 
cause problems with any existing operator.

- ron



""Ford, Mike"" <M.Ford@leedsmet.ac.uk> schreef in bericht 
news:CDA511FF6152D14E922434CE338CE8BB275841@leedsmet-exch1.leedsmet.ac.uk...


> > […]
>
> 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

---

## #20730 — Marian Kostadinov — 2005-11-28T16:30:54+00:00

URL: https://externals.io/message/20722#20730 · In reply to: #20729

Is ` (back quote) suitable for namespace separator? I cannot remember
just now if it was used somewhere.

2005/11/28, Ron Korving <r.korving@xit.nl>:
> wow, I like foo~>bar~>obj->method()
> I love ':' best, but if that really can't be, I must say '~>' looks pretty
> cool to me, cute even, like a little fishie ;)
>
> anywaaay.. the best alternative to ':' i've seen so far, and i doubt it'll
> cause problems with any existing operator.
>
> - ron
>
>
>
> ""Ford, Mike"" <M.Ford@leedsmet.ac.uk> schreef in bericht
> news:CDA511FF6152D14E922434CE338CE8BB275841@leedsmet-exch1.leedsmet.ac.uk...
> 
>
> > […]
>
>
> 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

---

## #20731 — Sebastian — 2005-11-28T16:40:59+00:00

URL: https://externals.io/message/20722#20731 · In reply to: #20730

It's used for shell execution stuff.

Perl did something similar and quickly regretted it


> Is ` (back quote) suitable for namespace separator? I cannot remember
> just now if it was used somewhere.
>
> 2005/11/28, Ron Korving <r.korving@xit.nl>:
> > […]

---

## #20732 — Bart de Boer — 2005-11-28T17:27:22+00:00

URL: https://externals.io/message/20722#20732 · In reply to: #20729

Well, the problem is: '->' isn't used for classes. It's used for 
objects! An object is an instance of a class. '~>' Would be more 
appropriate if there would be such a thing as an instance of a 
namespace. But not for accessing the namespace itself. (In my opinion)

This is why I think it should be something similar to :: and not to -> 
or anything with >.

Personally I *really* prefer :: since, from a programming point of view, 
a namespace "container" acts almost the same as a class "container". I 
think this is also more consistent with other programming languages. But 
people said this would be a performance hit.

So, if performance really is an issue. How about ;; then?

name1;;name2::myfunction();





Ron Korving wrote:
> wow, I like foo~>bar~>obj->method()
> I love ':' best, but if that really can't be, I must say '~>' looks pretty 
> cool to me, cute even, like a little fishie ;)
> 
> anywaaay.. the best alternative to ':' i've seen so far, and i doubt it'll 
> cause problems with any existing operator.
> 
> - ron
> 
> 
> 
> ""Ford, Mike"" <M.Ford@leedsmet.ac.uk> schreef in bericht 
> news:CDA511FF6152D14E922434CE338CE8BB275841@leedsmet-exch1.leedsmet.ac.uk...
> 
> 
> 
> > […]
> 
> 
> 
> 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

---

## #20733 — Sean Coates — 2005-11-28T17:41:23+00:00

URL: https://externals.io/message/20722#20733 · In reply to: #20732

> How about ;; then?
> name1;;name2::myfunction();

PLEASE, MAKE IT STOP!
;; is already perfectly valid syntax:
sean@iconoclast:~$ php5 -r 'define("name1",FALSE); class name2{function
myfunction(){ echo "foo\n"; }} name1;;name2::myfunction();'
foo

* Pre-existing operators are out of the question.
* Enforcing whitespace is out of the question.
* There's no solid reason not to use "\" ("I think it's ugly" is not a
solid reason).

This thread isn't actually accomplishing anything. If I'm not mistaken,
it's degraded to the point that many of the core devs (the ones who'll
actually make the final decision) have stopped paying attention. We're
talking in circles and are probably getting nothing resolved.

S
