* [ruby-core:91234] [Ruby trunk Feature#15559] Logical XOR (^^) operator
[not found] <redmine.issue-15559.20190123171723@ruby-lang.org>
@ 2019-01-23 17:17 ` keystonelemur
2019-01-24 2:18 ` [ruby-core:91240] " muraken
` (3 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: keystonelemur @ 2019-01-23 17:17 UTC (permalink / raw)
To: ruby-core
Issue #15559 has been reported by baweaver (Brandon Weaver).
----------------------------------------
Feature #15559: Logical XOR (^^) operator
https://bugs.ruby-lang.org/issues/15559
* Author: baweaver (Brandon Weaver)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
Currently we have bitwise `&` and logical `&&`, and bitwise `|` and logical `||`. Would it be possible to have logical `^^` in addition to the bitwise `^` for XOR?
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:91240] [Ruby trunk Feature#15559] Logical XOR (^^) operator
[not found] <redmine.issue-15559.20190123171723@ruby-lang.org>
2019-01-23 17:17 ` [ruby-core:91234] [Ruby trunk Feature#15559] Logical XOR (^^) operator keystonelemur
@ 2019-01-24 2:18 ` muraken
2019-01-24 2:20 ` [ruby-core:91241] " muraken
` (2 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: muraken @ 2019-01-24 2:18 UTC (permalink / raw)
To: ruby-core
Issue #15559 has been updated by mrkn (Kenta Murata).
You can write `expr1 ^^ expr2` as `!expr1 != !expr2` in the current Ruby.
If both `expr1` and `expr2` are boolean, you can write `expr1 != expr2`.
I think `^^` can be useful for the case that both `expr1` and `expr2` are not boolean.
Have you ever write such conditional expressions?
----------------------------------------
Feature #15559: Logical XOR (^^) operator
https://bugs.ruby-lang.org/issues/15559#change-76485
* Author: baweaver (Brandon Weaver)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
Currently we have bitwise `&` and logical `&&`, and bitwise `|` and logical `||`. Would it be possible to have logical `^^` in addition to the bitwise `^` for XOR?
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:91241] [Ruby trunk Feature#15559] Logical XOR (^^) operator
[not found] <redmine.issue-15559.20190123171723@ruby-lang.org>
2019-01-23 17:17 ` [ruby-core:91234] [Ruby trunk Feature#15559] Logical XOR (^^) operator keystonelemur
2019-01-24 2:18 ` [ruby-core:91240] " muraken
@ 2019-01-24 2:20 ` muraken
2019-01-24 2:26 ` [ruby-core:91243] " mame
2019-01-25 4:14 ` [ruby-core:91255] " sawadatsuyoshi
4 siblings, 0 replies; 5+ messages in thread
From: muraken @ 2019-01-24 2:20 UTC (permalink / raw)
To: ruby-core
Issue #15559 has been updated by mrkn (Kenta Murata).
I think `!=` is easier to understand than `^^`.
----------------------------------------
Feature #15559: Logical XOR (^^) operator
https://bugs.ruby-lang.org/issues/15559#change-76486
* Author: baweaver (Brandon Weaver)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
Currently we have bitwise `&` and logical `&&`, and bitwise `|` and logical `||`. Would it be possible to have logical `^^` in addition to the bitwise `^` for XOR?
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:91243] [Ruby trunk Feature#15559] Logical XOR (^^) operator
[not found] <redmine.issue-15559.20190123171723@ruby-lang.org>
` (2 preceding siblings ...)
2019-01-24 2:20 ` [ruby-core:91241] " muraken
@ 2019-01-24 2:26 ` mame
2019-01-25 4:14 ` [ruby-core:91255] " sawadatsuyoshi
4 siblings, 0 replies; 5+ messages in thread
From: mame @ 2019-01-24 2:26 UTC (permalink / raw)
To: ruby-core
Issue #15559 has been updated by mame (Yusuke Endoh).
> Would it be possible to have logical ^^ in addition to the bitwise ^ for XOR?
I think it is possible, but we need a good reason to do so. Do you have any use case?
----------------------------------------
Feature #15559: Logical XOR (^^) operator
https://bugs.ruby-lang.org/issues/15559#change-76488
* Author: baweaver (Brandon Weaver)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
Currently we have bitwise `&` and logical `&&`, and bitwise `|` and logical `||`. Would it be possible to have logical `^^` in addition to the bitwise `^` for XOR?
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:91255] [Ruby trunk Feature#15559] Logical XOR (^^) operator
[not found] <redmine.issue-15559.20190123171723@ruby-lang.org>
` (3 preceding siblings ...)
2019-01-24 2:26 ` [ruby-core:91243] " mame
@ 2019-01-25 4:14 ` sawadatsuyoshi
4 siblings, 0 replies; 5+ messages in thread
From: sawadatsuyoshi @ 2019-01-25 4:14 UTC (permalink / raw)
To: ruby-core
Issue #15559 has been updated by sawa (Tsuyoshi Sawada).
Unlike `&&` and `||`, which involves short-circuit evaluation, and hence are keywords rather than methods, the proposed `^^` will not involve short-circuit evaluation. Which is the intended proposal: as a keyword, or as a method?
----------------------------------------
Feature #15559: Logical XOR (^^) operator
https://bugs.ruby-lang.org/issues/15559#change-76502
* Author: baweaver (Brandon Weaver)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
Currently we have bitwise `&` and logical `&&`, and bitwise `|` and logical `||`. Would it be possible to have logical `^^` in addition to the bitwise `^` for XOR?
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-01-25 4:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <redmine.issue-15559.20190123171723@ruby-lang.org>
2019-01-23 17:17 ` [ruby-core:91234] [Ruby trunk Feature#15559] Logical XOR (^^) operator keystonelemur
2019-01-24 2:18 ` [ruby-core:91240] " muraken
2019-01-24 2:20 ` [ruby-core:91241] " muraken
2019-01-24 2:26 ` [ruby-core:91243] " mame
2019-01-25 4:14 ` [ruby-core:91255] " sawadatsuyoshi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).