From: jared@... Date: 2018-03-27T20:32:33+00:00 Subject: [ruby-core:86335] [Ruby trunk Feature#7511] short-circuiting logical implication operator Issue #7511 has been updated by jaredbeck (Jared Beck). The spirit of ruby is to make programmers happy. So, if logical implication would make programmers happy, we must consider it. It doesn't matter if it's infrequently used. For example, `Array#zip` is rarely used, but it makes me very happy when I use it. To me, the primary concern is that ruby has already assigned meaning to most ASCII characters. So, perhaps implication should simply be implemented as a named method, rather than an operator. For example, ``` class TrueClass def implies(other) !self || other end end true.implies(false) #=> false true.implies(true) #=> true ``` This implementation will not hurt ruby, and will make programmers happy. What do you think? ---------------------------------------- Feature #7511: short-circuiting logical implication operator https://bugs.ruby-lang.org/issues/7511#change-71258 * 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: