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

2001-10-01 Thread Chuck Hagenbuch

Quoting Harald Radi [EMAIL PROTECTED]:

 is there a reason why a namespace should contain anything other than classes ?
 we have static functions and static members in classes, no need for them
 in namespaces too.

We don't have static members. And we need namespaces for constants, also.

-chuck

--
Charles Hagenbuch, [EMAIL PROTECTED]
Some fallen angels have their good reasons.

-- 
PHP Development Mailing List http://www.php.net/
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] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] namespaces ambiguity

2001-10-01 Thread Harald Radi

 We don't have static members.

but we will in ze2 !?

 And we need namespaces for 
 constants, also.

why ?


class Foo {
 final $BAR = blah;
}

namespace Foo;

class Bar {
 static function bar() {
  echo $Foo::BAR;
 }
}


if (Foo::Bar::bar() === $Foo::BAR) {
 echo juhuuu;
} else {
 echo damn;
}


you have classes, you have constants, you have functions, ... what more
do you want ?

harald.


-- 
PHP Development Mailing List http://www.php.net/
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] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] namespaces ambiguity

2001-10-01 Thread Chuck Hagenbuch

Quoting Harald Radi [EMAIL PROTECTED]:

  And we need namespaces for 
  constants, also.
 
 why ?
 
 
 class Foo {
  final $BAR = blah;
 }

I'm sorry, I haven't been following all of this - is 'final' a keyword that 
will be available (and enforced) in ze2?

-chuck

--
Charles Hagenbuch, [EMAIL PROTECTED]
Some fallen angels have their good reasons.

-- 
PHP Development Mailing List http://www.php.net/
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] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] namespaces ambiguity

2001-10-01 Thread Harald Radi

 I'm sorry, I haven't been following all of this - is 'final' 
 a keyword that 
 will be available (and enforced) in ze2?

i don't either, but how else will you bind constants to a class /
namespace ?


-- 
PHP Development Mailing List http://www.php.net/
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] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] namespaces ambiguity

2001-10-01 Thread Andrei Zmievski

On Mon, 01 Oct 2001, Harald Radi wrote:
 why ?
 
 
 class Foo {
  final $BAR = blah;
 }
 
 namespace Foo;
 
 class Bar {
  static function bar() {
   echo $Foo::BAR;
  }
 }
 
 
 if (Foo::Bar::bar() === $Foo::BAR) {
  echo juhuuu;
 } else {
  echo damn;
 }
 
 
 you have classes, you have constants, you have functions, ... what more
 do you want ?

I don't think emulating constants with static members is a good idea.
For one, it'd require introducing 'final' keyword and so on.

-Andrei
* I don't mind going nowhere as long as it's an interesting path. *

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2001-10-01 Thread Andrei Zmievski

On Mon, 01 Oct 2001, Harald Radi wrote:
 i don't either, but how else will you bind constants to a class /
 namespace ?

echo Foo::CONSTANT;

-Andrei

Try to spend the next 30 seconds not thinking
 about a blue-eyed polar bear. -Feodor Dostoevsky 

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2001-10-01 Thread Harald Radi

  i don't either, but how else will you bind constants to a class / 
  namespace ?
 
 echo Foo::CONSTANT;

yes, but how do you define them ?

if it's like this:

namespace Foo;
define(CONSTANT, 123);

it won't be a problem either because then a class can't contain such a
definition (yet) and there won't be any ambiguities too.

harald.


-- 
PHP Development Mailing List http://www.php.net/
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] RE: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] namespaces ambiguity

2001-10-01 Thread Andrei Zmievski

On Mon, 01 Oct 2001, Harald Radi wrote:
 yes, but how do you define them ?
 
 if it's like this:
 
 namespace Foo;
 define(CONSTANT, 123);
 
 it won't be a problem either because then a class can't contain such a
 definition (yet) and there won't be any ambiguities too.

That's how I was thinking they would be defined.

Funny, but my automated signature somehow seems relevant to this.

-Andrei

In this age, which believes that there is a short cut to everything,
 the greatest lesson to be learned is that the most difficult way is, in
 the long run, the easiest.
-Henry Miller, The Books in My Life

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2001-10-01 Thread Jon Parise

On Mon, Oct 01, 2001 at 06:19:01PM +0200, Harald Radi wrote:

   i don't either, but how else will you bind constants to a class / 
   namespace ?
  
  echo Foo::CONSTANT;
 
 yes, but how do you define them ?
 
 if it's like this:
 
 namespace Foo;
 define(CONSTANT, 123);
 
On perhaps optionally:

define(CONSTANT, 123, 'Foo');

... which will define the constant in the namespace 'Foo'.

It might also make sense to allow:

define(Foo::CONSTANT, 123);

-- 
Jon Parise ([EMAIL PROTECTED])  .  Information Technology (2001)
http://www.csh.rit.edu/~jon/  :  Computer Science House Member

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]