Issue #7511 has been updated by rits (First Last).


charliesome (Charlie Somerville) wrote:
> It isn't something I can imagine would see much use.

implication is very common, the presence or validity of something requiring some condition to hold.

if a && b && c && (d => e) && (f => g)
...
end

is a lot more clear than

if a && b && c && (d ? e : true) && (!f || g)
...
end

especially if some of a, b, c, d, e, f, g are non trivial expressions
----------------------------------------
Feature #7511: short-circuiting logical implication operator
https://bugs.ruby-lang.org/issues/7511#change-34420

Author: rits (First Last)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 


I find I need logical implication (will use => here) in boolean expressions fairly often

and even though a => b is equivalent to !a || b, this substitute is more difficult to read and make sense of in long expressions




-- 
http://bugs.ruby-lang.org/