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
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
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
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
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
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
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
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
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
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
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
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",
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
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 *
> >
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
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
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
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
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
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
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
21 matches
Mail list logo