Stanislav Malyshev wrote:
Hi!
What a nitpicking :) So would I say that the global statement is
inconsistent with static because it doesn't allow assignments within
the statement :p
Sure it is. That's just another thing to show all this "consistency"
talk is blown way out of proportion long ago. Now let's make global
accept assignments and ignore them for "consistency", should we?
I'd prefer the opposite way in which no initializers are allowed for
static. null type was introduced to mark uninitialized variables in the
first place, so if we have strictly kept the original intention, there
should be no problem with this idea. (I'd say NULL values from the
database or other softwares should have been made effectively
differentiable with language-defined null values, but this is another issue)
Apart from this, the constructs in question share the same semantics
where their role is to define variables that refers to values of a
non-local data storage, so making the lexical variable declaration
statement look like the others is not inconsistent with the current
language syntax, whereas the "use" construct after the argument list is
inconsistent with the ordinary function definition unless my proposal
[1] is accepted.
[1] http://news.php.net/php.internals/39071
Moriyoshi
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php