Re: namespace issues

From: Date: Tue, 30 Sep 2008 03:25:31 +0000
Subject: Re: namespace issues
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-40797@lists.php.net to get a copy of this message
On Tue, Sep 23, 2008 at 11:47:30AM +0400, Dmitry Stogov wrote: > Stanislav Malyshev wrote: > > > > 3. Functions will not be allowed inside namespaces. We arrived to > > conclusion that they are much more trouble than they're worth, and > > summarily we would be better off without them. Most of the functionality > > could be easily achieved using static class methods, and the rest may be > > emulated with variable function names, etc. > > > > Comments? > > 3. In case we remove functions we also need to remove constants as they > have exactly the same ambiguity problems. Classes inside name spaces raise the same issue: <?php namespace n_1; class c_1 { const CNST_1 = "constant\n"; public static function f_1() { echo "function\n"; } } echo n_1::c_1::CNST_1; n_1::c_1::f_1(); ?> The currently proposed operator is a major problem. Thanks, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.internals (#40797) next »