Re: Inconsistencies in 5.3

From: Date: Mon, 04 Aug 2008 06:55:00 +0000
Subject: Re: Inconsistencies in 5.3
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-39597@lists.php.net to get a copy of this message
Hi Marcus, see below Marcus Boerger wrote:
Hello Internals, please let's not introduce new inconsistencies. Rather lets make new stuff consistent with old stuff during the alpha phase of 5.3. 1) new keyword 'use'. Semantically it is the same as 'static' or 'global' so it should be used in the same location.
For me 'use' is the best keyword as it says that closure uses variables from current content. (the same keyword is used for import from namespaces)
2) namespaces, either use 'package' and only one per file, or use 'namespace' with curly braces. Read this as be consistent with other languages and even if one or two people do not like it the two main languages out there which have it are Java which goes with the former and C++ which does the latter. Please chose and not mix it. Also our mix is a nightmare when developing code. If we feel we have to keep the keyword 'namesapce' but cannot have curly braces, than I suggest we disallow multiple namespace per file. And there is no technical reason and surely no other reason whatsoever to not have curly braces. If there is then we either fix that or went with the wrong approach.
I don't like multiple namespaces per file too. As I remember they were introduced by Greg's request related to ext/phar. May be he already changed his mind. 'package' or 'namespace' is not so important for me. Thanks. Dmitry.
3) __invokable, see Etiene's mail Best regards, Marcus


« previous php.internals (#39597) next »