[ruby-core:86338] [Ruby trunk Feature#7511] short-circuiting logical implication operator

From: nobu@...
Date: 2018-03-28 02:32:00 UTC
List: ruby-core #86338
Issue #7511 has been updated by nobu (Nobuyoshi Nakada).


It doesn't short-circuit, the argument is evaluated always regardless the receiver.

----------------------------------------
Feature #7511: short-circuiting logical implication operator
https://bugs.ruby-lang.org/issues/7511#change-71261

* Author: rits (First Last)
* Status: Assigned
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version: Next Major
----------------------------------------
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





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

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next