Using ::: as a namespace seperator would be great.
Marcel Esser, Technical Lead
Croscon, LLC
http://www.croscon.com
Marcel Esser wrote:
Using ::: as a namespace seperator would be great.
A general rule of telephony dialing and other data input, three of
the same character will too often be entered or recognized as two
or four characters due to user or mechanical error. That's why
when you see mnemonic phone numbers they rarely repeat three
digits in the middle (three 0's at the end for example aren't
subject to the excess fourth repetition problem).
Hello William,
Friday, October 17, 2008, 7:57:53 PM, you wrote:
Marcel Esser wrote:
Using ::: as a namespace seperator would be great.
A general rule of telephony dialing and other data input, three of
the same character will too often be entered or recognized as two
or four characters due to user or mechanical error. That's why
when you see mnemonic phone numbers they rarely repeat three
digits in the middle (three 0's at the end for example aren't
subject to the excess fourth repetition problem).
This is the major flaw with that solution. Personally I just looked at
working code that had (:::) and () which is the second option I also
mentioned already long ago. And (:::) can be read very easy. The visual
difference to (::) is big enough. However it is too easy to either type
two or four. Thus the backslash (the only other conflict free) character
is probably the better option - even though no one has done something
like that. Btw, it pretty much suggests thatyou use the same structure
for your directories and files. Which you'd do inside __autoload() most
likely anyway.
Best regards,
Marcus
Hello all,
Greg was so kind to give me part of his awesome upcoming Pyrus code. He
actually has it running with both ':::' and '' as namespace separators.
So I thought I'd help out a tiny tiny bit by giving you all the choice of
having a look at actual working code:
http://php.net/~helly/triplecolon.html
http://php.net/~helly/triplecolon-colored.html
http://php.net/~helly/backslash-colored.html
http://php.net/~helly/backslash.html
marcus
Saturday, October 18, 2008, 11:03:50 PM, you wrote:
Hello William,
Friday, October 17, 2008, 7:57:53 PM, you wrote:
Marcel Esser wrote:
Using ::: as a namespace seperator would be great.
A general rule of telephony dialing and other data input, three of
the same character will too often be entered or recognized as two
or four characters due to user or mechanical error. That's why
when you see mnemonic phone numbers they rarely repeat three
digits in the middle (three 0's at the end for example aren't
subject to the excess fourth repetition problem).
This is the major flaw with that solution. Personally I just looked at
working code that had (:::) and () which is the second option I also
mentioned already long ago. And (:::) can be read very easy. The visual
difference to (::) is big enough. However it is too easy to either type
two or four. Thus the backslash (the only other conflict free) character
is probably the better option - even though no one has done something
like that. Btw, it pretty much suggests thatyou use the same structure
for your directories and files. Which you'd do inside __autoload() most
likely anyway.
Best regards,
Marcus
Best regards,
Marcus
Marcus Boerger wrote:
Hello all,
Greg was so kind to give me part of his awesome upcoming Pyrus code. He
actually has it running with both ':::' and '' as namespace separators.
So I thought I'd help out a tiny tiny bit by giving you all the choice of
having a look at actual working code:http://php.net/~helly/triplecolon.html
http://php.net/~helly/triplecolon-colored.html
http://php.net/~helly/backslash-colored.html
http://php.net/~helly/backslash.htmlmarcus
Thanks massively! Those code samples make it vastly clear just how many
times we'll all be calling functions in the default namespace - and I
for one don't fancy typing ::: for every function or normal PHP class I
ever use! + \strpos() etc. just looks and types natural to me.
I realise we wouldn't /have/ to type \ or ::: every time we call a
'normal' function, but I for one would prefer to by way of good
practise, and those extra chars make a huge difference as far as I'm
concerned.
I do not want to spend the rest of my life typing ::: in front of every
function.
note: it type's natural as the \ is right beside zxcv on my keyboard,
which I'm ctrl+tapping all the time, so comes natural to my pinky!
This is a no-brainer AFAIK.
Thanks again (really),
Nathan
Marcus Boerger wrote:
Hello all,
Greg was so kind to give me part of his awesome upcoming Pyrus code. He
actually has it running with both ':::' and '' as namespace separators.
So I thought I'd help out a tiny tiny bit by giving you all the choice of
having a look at actual working code:http://php.net/~helly/triplecolon.html
http://php.net/~helly/triplecolon-colored.html
http://php.net/~helly/backslash-colored.html
http://php.net/~helly/backslash.htmlmarcus
shift+;(x3) vs \
Quicker shift + ; x 3 than finding that freakin backslash on my HP 530 notebook.
-----Original Message-----
From: Nathan Rixham [mailto:nrixham@gmail.com]
Sent: Sunday, October 19, 2008 2:52 AM
To: internals@lists.php.net
Subject: Re: [PHP-DEV] Namespace issuesMarcus Boerger wrote:
Hello all,
Greg was so kind to give me part of his awesome upcoming Pyrus code.
He
actually has it running with both ':::' and '' as namespace
separators.
So I thought I'd help out a tiny tiny bit by giving you all the choice
of
having a look at actual working code:http://php.net/~helly/triplecolon.html
http://php.net/~helly/triplecolon-colored.html
http://php.net/~helly/backslash-colored.html
http://php.net/~helly/backslash.htmlmarcus
shift+;(x3) vs \
Greg was so kind to give me part of his awesome upcoming Pyrus code. He
actually has it running with both ':::' and '' as namespace separators.
So I thought I'd help out a tiny tiny bit by giving you all the choice of
having a look at actual working code:http://php.net/~helly/triplecolon.html
http://php.net/~helly/triplecolon-colored.html
http://php.net/~helly/backslash-colored.html
http://php.net/~helly/backslash.html
I did say off-list that Nathan would be an immediate fan...
(Nathan actually proposed this off-list during the survey, not knowing that
the idea had been rejected 4 years or so back.)
Revisiting this.. isn't a crime. It's the one ns separator we have available
in PHP that won't mess up for people with bad eyesight, for one. Among
developers, that's quite a big deal.
The big question is whether we need a namespace separator at all. As far as
I'm aware, this is still under investigation (and this time it's for real).
- Steph
marcus
shift+;(x3) vs \
Nathan Rixham wrote:
Greg was so kind to give me part of his awesome upcoming Pyrus code. He
actually has it running with both ':::' and '' as namespace separators.
So I thought I'd help out a tiny tiny bit by giving you all the choice of
having a look at actual working code:shift+;(x3) vs \
And there are no problems with those on foreign keyboards?
I recall seeing a number of 'complaints' about some of the separator
characters that are difficult to access on foreign language keyboards. Has
anybody tabulated that so that the extent of that problem is understood?
Just an aside, and while I might put changing the separator used above adding
'use namespace', from a documentation and review of code where multiple files
are involved, going with both ( keeping finger of shift key which it goes to
automatically ;) ) makes perfect sense to me.
But do I still understand that there is an alternative method that was not
part of this last round of voting? And needs to be reviewed in light of the
current 'consensus' ?
( putting quotes around a word is automatic to me as well - just means that
the word may not be entirely appropriate but gives the right idea )
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
shift+;(x3) vs \
Ok I'll try to make a very neutral comment. For the moment most are
still using an english keyboard (no matter which english in this case
and I'd actually be interested in knowing numbers for a fact if
anyone's got something) and ergonomically speaking, ::: is much easier
to type than \ for those who actually learned to type with the adsf
jkl; keyboard. When you learn typing you usually learn to type using
the left-hand side shift key for "most" of the letters/words, for
instance typing : doesn't require a movement of the right hand since
your pinky is already on the ; key whereas the \ key requires a
"not-so-used" movement of the hand.
Anyways, I was just saying that without considering the question
because I absolutely don't feel like redicussing this over and over.
We have had a massive list fight over 3-4 years ago about it and I'm
not getting into this one.
--
Slan,
David
Hello David,
Sunday, October 19, 2008, 1:02:21 PM, you wrote:
shift+;(x3) vs \
Ok I'll try to make a very neutral comment. For the moment most are
still using an english keyboard (no matter which english in this case
and I'd actually be interested in knowing numbers for a fact if
anyone's got something) and ergonomically speaking, ::: is much easier
to type than \ for those who actually learned to type with the adsf
jkl; keyboard. When you learn typing you usually learn to type using
the left-hand side shift key for "most" of the letters/words, for
instance typing : doesn't require a movement of the right hand since
your pinky is already on the ; key whereas the \ key requires a
"not-so-used" movement of the hand.
Anyways, I was just saying that without considering the question
because I absolutely don't feel like redicussing this over and over.
We have had a massive list fight over 3-4 years ago about it and I'm
not getting into this one.
All good points :-)
So for typing it sounds to me like both would work as a compromise well
enough. Also on a german keyboard layout a backslash is in the same
category than the ':'. Personally I think however that I would to often
confuse myself with typing '::' vs ':::'. Often enough I find myself typing
the wrong char, typing delete as many times as necessary to go back to the
wrong char and then typing correct again. And in those case I mostly do not
look at the screen. I look at the keyboard to ensure I type what I wanted,
fixing my hand position, no longer seeing whether that is what I needed to
type. And this works for '::' vs '' becasue they are completely different
but I think it does not work for '::' vs ':::', simply becasue that is not
a different enough and probably I know what to type always but confusing
myself with hitting the key the right amount of times.
The other parts are:
a) do we need one - I think so - because it means we solve any issue once
and forever
b) what reads better ':::' or ''. Personally I think both work fine for
me. But I agree with Steph that other people might have a hard time
differenciating them.
--
Slan,
David
Best regards,
Marcus
Hi Lester,
And there are no problems with those on foreign keyboards?
If there are, those foreign keyboards are unable to offer either escaped
chars or MS paths... which seems highly unlikely.
But do I still understand that there is an alternative method that was not
part of this last round of voting? And needs to be reviewed in light of
the current 'consensus' ?
It was linked from Greg's proposals too:
http://wiki.php.net/rfc/namespaceref. Basically (assuming that we're saying
we want ns support for functions/constants) Stas avoids the need for a
second ns separator by using the syntax
Name->Member
for static access. The 'avoid the need for second ns separator' part of
Stas' proposal has widespread support according to the poll, it's just a
case of figuring a way to manage this without introducing ambiguity into the
code.
Both Stas' proposal and Greg's option #3 are flawed in that way (either to
humans or to the Engine), so the search is on to find a solution that isn't
ambivalent to either - always assuming it's possible.
- Steph
Hi,
Steph Fox wrote:
Hi Lester,
And there are no problems with those on foreign keyboards?
If there are, those foreign keyboards are unable to offer either escaped
chars or MS paths... which seems highly unlikely.
Well, on German keyboards, it's accessible but only by using ALTGR+?,
which is not really a comfortable combination.
Philipp
Well, on German keyboards, it's accessible but only by using ALTGR+?,
which is not really a comfortable combination.
Useful to know, thanks Philipp.
Any more localized keyboard issues we should know about? Anyone?
- Steph
On Monday 20 October 2008 20:42:36 Steph Fox wrote:
Well, on German keyboards, it's accessible but only by using ALTGR+?,
which is not really a comfortable combination.Useful to know, thanks Philipp.
Any more localized keyboard issues we should know about? Anyone?
- Steph
The "german keyboard" issue isn't really one. {}[] are in the same "class" of
characters (alt-Gr + number-row). So, as a programmer, you either have to
live with that anyway because there's no avoiding {}[], or you switch to the
us layout while programming (which quite a few people do).
Regards,
Stefan
The "german keyboard" issue isn't really one. {}[] are in the same "class"
of
characters (alt-Gr + number-row). So, as a programmer, you either have to
live with that anyway because there's no avoiding {}[], or you switch to
the
us layout while programming (which quite a few people do).
Also useful to know :)
- Steph
On an icelandic keyboard "" is AltGr + (key right of 0 in the top
row), just an fyi if you guys wanted to know.
For my two cents. "" looks like its not supposed to be there.
Is there no other combination of two simbols that would work? Like >>
or +> or ** or .. or something in that fashion ?
Ólafur Waage
2008/10/20 Steph Fox steph@php.net:
The "german keyboard" issue isn't really one. {}[] are in the same "class"
of
characters (alt-Gr + number-row). So, as a programmer, you either have to
live with that anyway because there's no avoiding {}[], or you switch to
the
us layout while programming (which quite a few people do).Also useful to know :)
- Steph
Steph Fox wrote:
Hi Lester,
And there are no problems with those on foreign keyboards?
If there are, those foreign keyboards are unable to offer either escaped
chars or MS paths... which seems highly unlikely.Well, on German keyboards, it's accessible but only by using ALTGR+?,
which is not really a comfortable combination.
So in your editor, map ::: to \ and be done with it.... no big deal.
regards,
Derick
--
HEAD before 5_3!: http://tinyurl.com/6d2esb
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org
Another issue I just came across caused by :: being used for both
namespaces and classes is the fact when it comes to validation such as
the one I've just put it for constant names, its impossible to
determine if the prefix is a namespace or a class name. So, I
definitely think we should change :: to just about anything else, as
long as its not :: I'd be happy.
Hi Lester,
And there are no problems with those on foreign keyboards?
If there are, those foreign keyboards are unable to offer either
escaped chars or MS paths... which seems highly unlikely.But do I still understand that there is an alternative method that
was not part of this last round of voting? And needs to be reviewed
in light of the current 'consensus' ?It was linked from Greg's proposals too: http://wiki.php.net/rfc/namespaceref
. Basically (assuming that we're saying we want ns support for
functions/constants) Stas avoids the need for a second ns separator
by using the syntaxName->Member
for static access. The 'avoid the need for second ns separator' part
of Stas' proposal has widespread support according to the poll, it's
just a case of figuring a way to manage this without introducing
ambiguity into the code.Both Stas' proposal and Greg's option #3 are flawed in that way
(either to humans or to the Engine), so the search is on to find a
solution that isn't ambivalent to either - always assuming it's
possible.
- Steph
--
Ilia Alshanetsky
Ilia Alshanetsky wrote:
Another issue I just came across caused by :: being used for both
namespaces and classes is the fact when it comes to validation such as
the one I've just put it for constant names, its impossible to determine
if the prefix is a namespace or a class name. So, I definitely think we
should change :: to just about anything else, as long as its not :: I'd
be happy.
LOL, this is never ending.
I was on the "change ::" bandwagon before realizing it won't fix
everything. Would changing the element separator help you in this case?
IMO, using a element separator would fix both ambiguity and help
autoload. I'm still for option #2, though it lost out already. ;)