Why did converting && and || to `and` and `or` die?

Relatively new to Julia, and like most people here love it. But I miss the readability of and and or. I discovered a few git issues on moving to a python-like syntax for the and and or operators (like https://github.com/JuliaLang/julia/issues/5238).

The issue comments seem numerous and more or less universally in favor of the change, with interjections in favor from people like @StefanKarpinski as recently as 2015 (two years after the issue was technically closed), so I was just wondering: why did this die? Does it still have to?

The issue has been discussed ad nauseum and it was decided not to be a good idea. I don’t believe there are any plans to revisit it. Rather than rehashing the discussion, I’ll point you to RFC: Make `and` & `or` aliases for `&&` and `||`. by Ismael-VC · Pull Request #19788 · JuliaLang/julia · GitHub for reference. Like anything, && and || will just take some getting used to for those coming from languages that have other ways of writing that.


it was decidedly not a good idea.

@ararslan, just curious, did you mean what was written, or that it was “decided that it was not a good idea”? :slight_smile:


There’s just not enough in favor of it aside from some very subjective judgements. Julia currently sticks to very standard operators for this functionality and there’s no really strong technical argument for changing that. Sure, some people would prefer writing and and or instead of && and ||, but then again some people feel the opposite way. We really don’t want both options in the language – that has only led to confusion and sadness in Perl and Ruby. So without a really strong reason to change this, the decision goes to the status quo.


This post was temporarily hidden by the community for possibly being off-topic, inappropriate, or spammy.

Thanks @ararslan! Looks like the discussion was in that pull, not the issue, so I missed it. Not sure that, in reading it, that it’s fair to characterize the consensus as “decidedly not a good idea” – seems it was rather close – but happy to see it got a fair hearing!

Yes I meant the latter, thanks.

What about the option and(a, b)?
Namely it would be great to have those in both forms.

No it is not a function call and must not be written like one.

You’re correct.
I mixed Short Circuit operation and Logical Operation.