Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update noteworthy-differences.md #55490

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

mestinso
Copy link
Contributor

  • Valid note/tip as of Julia 1.7

@mestinso
Copy link
Contributor Author

I found this tip to be useful because it gives users the option of simply replacing Matlab's | with Julia's .|| to achieve Matlab-like behavior. I'm open to wordsmithing or changing the text but I'm confident this is a useful tip for anybody coming from Matlab.

@adienes
Copy link
Contributor

adienes commented Aug 14, 2024

I wouldn't want to give the impression that operator precedence is the primary difference between |, & and ||, &&

(the primary difference being that the former are bitwise operations and the latter are logical operations; the difference in precedence may as well be an accident)

@mbauman
Copy link
Member

mbauman commented Aug 14, 2024

In this context it is, though. The equivalent for Matlab's & is && or .&&. Now that we have that option, we could even lead with it!

the difference in precedence may as well be an accident

I can definitively tell you — as the person who both first requested this and who implemented it — that precedence is the primary motivation for this feature.

@giordano giordano added the docs This change adds or pertains to documentation label Aug 14, 2024
Co-authored-by: Matt Bauman <mbauman@gmail.com>
@mestinso
Copy link
Contributor Author

Next steps for getting this one merged?

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants