[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] namespaces ambiguity

2001-10-01 Thread Zak Greant

On October 1, 2001 04:51 am, Andi Gutmans wrote:
> At 12:46 PM 10/1/2001 +0200, Stig Sæther Bakken wrote:
[snip]
> >I still think Zeev's suggestion (HTML::Table) is very good, if it
> >doesn't impose too much runtime overhead.
>
> I don't like Zeev's suggestion because it does impose an extra hash
> lookup (usually it'll be two) and probably some more logic too. I
> don't think that new features we add today should suffer from
> run-time overhead some constructs from the past have had to suffer.
> By the way, it also has some ambiguities. Is foo::bar() a function in
> class foo or in namespace foo. No one said you can't have a namespace
> foo when you have a class foo.
> I think the best way to go is to go with ':' and live with the
> ambiguity. Many languages have such ambiguities and it's probably not
> such a big deal. In light of :: also having ambiguities why not go
> with :?
>
> Andi

This may be a ~very~ daft question, but what effect would having 
classes behave as read-only namespaces have? Would that alleviate any
problems?

Just my one cent (not willing to put a whole two cents on this one. ;)

-- 
Zak Greant

PHP Quality Assurance Team
http://qa.php.net/

"We must be the change we wish to see." - M. K. Ghandi

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] namespaces ambiguity

2001-10-01 Thread Andi Gutmans

At 12:46 PM 10/1/2001 +0200, Stig Sæther Bakken wrote:
>[Zak Greant <[EMAIL PROTECTED]>]
> > On September 30, 2001 06:15 pm, Wez Furlong wrote:
> > > What about "." then (Java/Delphi)?
> > >
> > > --Wez.
> >
> > Wouldn't that conflict with the concatenation operator?
> >
> > Unless I am mistaken, it looks like only the following single symbols
> > are available: % * | \ (outside of quotes at least)
>
>Uhm, % and * are taken for modulo and multiplication.
>
>So how do these look:
>
>   HTML\Table  - looks too 1980
>   HTML|Table  - hmm, weird
>
>I still think Zeev's suggestion (HTML::Table) is very good, if it
>doesn't impose too much runtime overhead.

I don't like Zeev's suggestion because it does impose an extra hash lookup 
(usually it'll be two) and probably some more logic too. I don't think that 
new features we add today should suffer from run-time overhead some 
constructs from the past have had to suffer.
By the way, it also has some ambiguities. Is foo::bar() a function in class 
foo or in namespace foo. No one said you can't have a namespace foo when 
you have a class foo.
I think the best way to go is to go with ':' and live with the ambiguity. 
Many languages have such ambiguities and it's probably not such a big deal. 
In light of :: also having ambiguities why not go with :?

Andi


--
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]