Re: Implicit isset in ternary operator

From: Date: Tue, 24 Jul 2012 18:09:13 +0000
Subject: Re: Implicit isset in ternary operator
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-61716@lists.php.net to get a copy of this message
2012/7/24 Yahav Gindi Bar <g.b.yahav@gmail.com>: > Yeah, that's a design decision, but its important because that's one of the PHP > greatest things - the code is very nice and readable, and it's kind of sad to ruin it... > > I didn't thought about template engines - I agree, it'll be great there, but does a > language syntax need to be defined only for a specific cases like template engine? It's one of the best things of PHP and the reason, why it was invented. > If the programmers will follow your guidelines and use this operators only for some unique and > rare cases - I strongly support that idea, but I'm afraid from programmers who'll make > their program full of operators which makes it unreadable by other programers... Hhummm, every programming language could be written unreadable. Even PHP. I can say that per sure. :) > I think that operators overriding should be implemented in a class scope (only for object with > object interaction, such as (merge operation): $mergedMember = $member1 + $member2; or for roles > permission concat - $memberRule = $adminRule - $editorRule) > But that's a different topic from the suggested feature... Which is a much better idea in general. My suggestion was only for a very special context and should be easier to implement. I currently think, this discussion needs more time, because I begin to forget, for what this is really needed. :) I suggest to (re)think about the real usage-cases... -- Alex Aulbach

« previous php.internals (#61716) next »