Re: [RFC] Interval Comparison

From: Date: Wed, 09 Nov 2016 19:47:59 +0000
Subject: Re: [RFC] Interval Comparison
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-96794@lists.php.net to get a copy of this message
On 11/8/2016 10:57 PM, David Walker wrote: > I don't think that alone allows the chaining of comparisons. I'd have to > look closer, but it'd seem to me that zend_ast_create_binary_op > (ZEND_AST_BINARY_OP) evaluation might need to be amended as well. Seems it > eventually calls a `op(zval*,zval*,zval*) so the evaluated end of: one op > would be a true/false, when comparing against another boolean op. > > Regardless of implementation, the core question you raised was should > something like it exist, I'm still a strong yes on that front. I'd just > promote introducing the left precedence and allowing the arbitrary chains > of comparison, rather than just a single interval comparison. > > cheers > -- > Dave > Yeah maybe not that easy but also not too complicated if we add associativity to the mix. I am open for both variations and could write up an RFC with a vote for both if desired. Not sure if I find the time to look into actual implementation but I most certainly can try. -- Richard "Fleshgrinder" Fussenegger

« previous php.internals (#96794) next »