Re: Support for keywords where possible

From: Date: Thu, 12 Sep 2013 06:43:30 +0000
Subject: Re: Support for keywords where possible
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
2013/9/11 Bob Weinand <[email protected]>

> Hi!
>
> I tried to widen the naming possibilities by allowing to use keywords as
> identifiers (for function names, class names, label (goto) names, ...)
> where possible. It doesn't break any BC.
>
> Furthermore when BC needs to be broken in future for new keywords, it will
> have a smaller impact as most usages of the new keyword then still work.
>
> It also prevents unnecessary workarounds like in
> https://wiki.php.net/rfc/named_params#syntax.
> There, to address a
> function with a parameter called $array, we could simply write func(array
> => $value); instead of the until now necessary func("array" => value);
>
> You can find the patch here:
> https://github.com/php/php-src/pull/438
>
> Any thoughts about this?
>
>
>
I like it! I always hated the fact that "list" is a reserved word.

Lazare INEPOLOGLOU
Ingénieur Logiciel


Thread (40 messages)

« previous php.internals (#69079) next »