Re: Constants in namesapces

From: Date: Wed, 22 Aug 2007 18:34:28 +0000
Subject: Re: Constants in namesapces
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-31856@lists.php.net to get a copy of this message
On 22.08.2007 22:25, Stanislav Malyshev wrote:
We do have runtime constants created with define(), so the critical need in runtime namespace constants is quite questionable to me.
"Critical need" is a matter of definition. You can do define(__NAMESPACE__.'::foo', 'bar') but frankly, it sucks. const foo = 'bar' looks so much better. That said, you are welcome to propose non-confusing syntax achieving the same :)
I propose to define these constants in compile time or change class constants to be defined in runtime. Either ways are ok to me. -- Wbr, Antony Dovgal

« previous php.internals (#31856) next »