On Mon, Jul 23, 2012 at 6:19 AM, Alex Aulbach <alex.aulb...@gmail.com>wrote:

> 2012/7/23 Sanford Whiteman <
> swhitemanlistens-softw...@cypressintegrated.com>:
> >> I think that you can compare the situation to the short if syntax ($a >
> $b
> >> ? $c : $d)
> >
> > Not sure I understand... that *is* the situation under discussion,
> > no?
>
> Use functions. Above case for example:
>
> ...
> My suggestion just is: At any point everybody needs one more operator
> for "his stuff". But that's why functions exists.
>
>
This is not about "his stuff", this is about the general userland
expectation of what a ternary operator will do with a $array[key]  where it
is not set.
This is a valid use case in every app and as we saw in lots of frameworks.

As for functions, i do not like the idea of having functions around for
this kind of operation, it will bring about the return of "utils.php" and i
don't think that's worth.
So while i agree not everything needs a core implementation, this does not
fall under that case.


>
> --
> Alex Aulbach
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Rafael Dohms
PHP Evangelist and Community Leader
http://www.rafaeldohms.com.br
http://www.phpsp.org.br

Reply via email to