Re: [PHP-DEV] [PATCH] bracketed namespace declarations

2008-11-07 Thread Stan Vassilev | FM
Hi, Ok so I had a quick chat with greg and reread his proposal and it's actually a sound proposal. My original concern was that if we don't implement proper subset of "namespace scopes" we'll have difficulty extending PHP in the future to support function-local use declarations etc. Howev

Re: [PHP-DEV] [PATCH] bracketed namespace declarations

2008-11-07 Thread Kenan R Sulayman
Hey there! Why don't you try an implementation as: > namespace foo; (contents xyz) > namespace foob; > (contents xyz of as second called namespace) > Wouldn't it be easier to make such an application tree instead of using the normal bracket-like opening? Your, -- (c) Kenan Sulayman Freelance D

Re: [PHP-DEV] [PATCH] bracketed namespace declarations

2008-11-07 Thread Gregory Beaver
Stan Vassilev | FM wrote: > // global, scope 1 > > namespace { // global, scope 2 } > > // global, scope 1 > > namespace { // global, scope 3 } > > // global, scope 1 > > namespace foo\bar { // foo\bar, scope 4 } > > // global, scope 1 > ?> I am afraid I must shed my generally congenial pu

Re: [PHP-DEV] [PATCH] bracketed namespace declarations

2008-11-07 Thread Stan Vassilev | FM
Sorry for the second email, I just forgot to mention something regarding how use statements apply from global scope to namespace x {}. The best way regarding realworld usage and existing state of the art would be to take into account the use statements in the scope above and apply the use stat

Re: [PHP-DEV] [PATCH] bracketed namespace declarations

2008-11-07 Thread Stan Vassilev | FM
Technically, you could argue that blah::hi() should resolve to blah\blah::hi(), but it is very difficult to track and figure out what "blah" means by eye. Thus, in the patch I implemented, if bracketed namespace declarations exist, global use statements are not allowed, but must exist within na

[PHP-DEV] [PATCH] bracketed namespace declarations

2008-11-07 Thread Gregory Beaver
Hi, Stas and company decided that they wanted namespaces to have two legal syntax choices: 1) single namespace per file: 2) multiple namespaces per file: I've implemented these two syntax options in a patch found at http://pear.php.net/~greg/bracketed.patch.txt based on earlier work of Dmit

Re: [PHP-DEV] Call it: allow reserved words in a class or not?

2008-11-07 Thread Stan Vassilev | FM
Sounds like an idea for custom extension, but I doubt this would work as a general approach. It limits dynamic nature of php, so won't be suitable for all cases Did you see this extension? http://pecl.php.net/package/automap Just two points: 1) It doesn't need to be suitable for all cases, as

Re: [PHP-DEV] Re: Case sensitivity

2008-11-07 Thread Stan Vassilev | FM
As another example, anyone with half a brain and more than 10 minutes experience with the internals of PHP knows that it'd be ridiculous to suggest that PHP's array type be re-written to act like Java or .NET. The fact that it is ridiculous is implicit, we all know it, it doesn't need to be sai

Re: [PHP-DEV] Call it: allow reserved words in a class or not?

2008-11-07 Thread Alexey Zakhlestin
On Fri, Nov 7, 2008 at 7:24 PM, Stan Vassilev | FM <[EMAIL PROTECTED]> wrote: >> What about adding a function that behaves like __autoload, but with >> respect to namespace wildcards? Something like: > > Hi, > > Ok so first: > > 1) We can't implement wildcards since a wildcard needs to be expanded

Re: [PHP-DEV] Re: Case sensitivity

2008-11-07 Thread Nate Abele
On Nov 7, 2008, at 12:59 AM, Ronald Chmara wrote: On Nov 6, 2008, at 6:27 PM, Nate Abele wrote: I was shocked and horrified that that ridiculous "remove-the-$" post actually turned into a legitimate discussion. I mean, seriously? No, not seriously. [snip] The trick is knowing when a j

Re: [PHP-DEV] Re: Case sensitivity

2008-11-07 Thread Dave Ingram
Travis Swicegood wrote: > On Nov 6, 2008, at 11:59 PM, Ronald Chmara wrote: > >> 1. All built-in PHP functions should be aliased in the worlds most >> used languages, so that declaring a "function" could also be written >> as: "funktsioon", "otstarve", "λειτουργία ", "ویرایش", "Fonction", >> "funci

Re: [PHP-DEV] Re: Case sensitivity

2008-11-07 Thread Travis Swicegood
On Nov 6, 2008, at 11:59 PM, Ronald Chmara wrote: 1. All built-in PHP functions should be aliased in the worlds most used languages, so that declaring a "function" could also be written as: "funktsioon", "otstarve", "λειτουργία ", "ویرایش", "Fonction", "funcionar", "fungsi", "funzionare",

Re: [PHP-DEV] Call it: allow reserved words in a class or not?

2008-11-07 Thread Stan Vassilev | FM
What about adding a function that behaves like __autoload, but with respect to namespace wildcards? Something like: Hi, Ok so first: 1) We can't implement wildcards since a wildcard needs to be expanded to a set of concrete classes at runtime for it to make sense, and we don't know what tho

Re: [PHP-DEV] Call it: allow reserved words in a class or not?

2008-11-07 Thread Stefan Walk
On Friday 07 November 2008 14:47:59 Josh Thompson wrote: > Johannes Schlüter wrote: > > On Thu, 2008-11-06 at 22:19 -0600, Josh Thompson wrote: > >> I don't understand why in the namespaced example no one seems to have a > >> problem with new A() meaning new \foo\bar\A(), but we can't use the * > >

Re: [PHP-DEV] Call it: allow reserved words in a class or not?

2008-11-07 Thread Josh Thompson
Johannes Schlüter wrote: On Thu, 2008-11-06 at 22:19 -0600, Josh Thompson wrote: I don't understand why in the namespaced example no one seems to have a problem with new A() meaning new \foo\bar\A(), but we can't use the * wildcard to do the same thing? Since we don't reliable know all possib

Re: [PHP-DEV] Call it: allow reserved words in a class or not?

2008-11-07 Thread Karsten Dambekalns
Hi. Steph Fox wrote: This thread really should be re-titled to "allow reserved words as a classname or not". Then perhaps the only logical response to the question would be so obvious that there would be no thread... oo-er... Right, the subject indicates a different question that what seems t

Re: [PHP-DEV] alpha3

2008-11-07 Thread Pierre Joye
hi, On Fri, Nov 7, 2008 at 9:51 AM, Lukas Kahwe Smith <[EMAIL PROTECTED]> wrote: > To quote myself on this topic: > "These are all convincing arguments to have done this earlier. But Johannes > and I are a bit worried, that this code did not see that much testing since > it was checked in to HEAD

Re: [PHP-DEV] alpha3

2008-11-07 Thread Lukas Kahwe Smith
On 07.11.2008, at 09:30, Pierre Joye wrote: hi! On Fri, Nov 7, 2008 at 9:29 AM, Hannes Magnusson <[EMAIL PROTECTED]> wrote: On Thu, Nov 6, 2008 at 22:00, Lukas Kahwe Smith <[EMAIL PROTECTED]> wrote: Hi, This are tentatively looking like alpha3 could hit on November 18th. So everybody pleas

Re: [PHP-DEV] alpha3

2008-11-07 Thread Pierre Joye
hi! On Fri, Nov 7, 2008 at 9:29 AM, Hannes Magnusson <[EMAIL PROTECTED]> wrote: > On Thu, Nov 6, 2008 at 22:00, Lukas Kahwe Smith <[EMAIL PROTECTED]> wrote: >> Hi, >> >> This are tentatively looking like alpha3 could hit on November 18th. >> So everybody please try to get whatever you are working

Re: [PHP-DEV] alpha3

2008-11-07 Thread Hannes Magnusson
On Thu, Nov 6, 2008 at 22:00, Lukas Kahwe Smith <[EMAIL PROTECTED]> wrote: > Hi, > > This are tentatively looking like alpha3 could hit on November 18th. > So everybody please try to get whatever you are working on ready to be > finished and committed by no later than 13th. So that packaging can ha

Re: [PHP-DEV] Call it: allow reserved words in a class or not?

2008-11-07 Thread Matthew Schiros
What about adding a function that behaves like __autoload, but with respect to namespace wildcards? Something like: That would allow for Stan's "use foo\bar\*" without impacting the performance of normal __autoload() calls. Johannes Schlüter wrote: > On Thu, 2008-11-06 at 22:19 -0600, Josh Tho