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

deprecate vectorized ! and ~ in favor of dot syntax #20543

Merged
merged 3 commits into from
Feb 13, 2017

Conversation

Sacha0
Copy link
Member

@Sacha0 Sacha0 commented Feb 9, 2017

With benefit of #20249, this pull request deprecates all remaining vectorized ! and ~ methods in favor of dot syntax (.!, .~). (.~ does not parse as a unary operator; the second commit changes that.) Best!

@Sacha0 Sacha0 added deprecation This change introduces or involves a deprecation broadcast Applying a function over a collection labels Feb 9, 2017
@Sacha0 Sacha0 changed the title deprecate vectorized ! in favor of dot syntax deprecate vectorized ! and ~ in favor of dot syntax Feb 9, 2017
@StefanKarpinski
Copy link
Member

I have to say there's something about unary operators that makes me feel like they should be vectorized. Of course, then we don't get loop fusion, but writing .!v just looks really odd.

@ararslan
Copy link
Member

Having a unary operators be exempt from the "no vectorization without dot representation" ideal seems a little iffy. But at the same time, I have to agree that the dots for unary ops look weird wherever you put them, especially before the operator. (!.v isn't too terrible IMO.)

Regarding loop fusion, it seems that they could be special-cased to achieve loop fusion, but then that's two special cases for unary ops...

@Sacha0
Copy link
Member Author

Sacha0 commented Feb 12, 2017

Rebased and now passing CI.

writing .!v just looks really odd

the dots for unary ops look weird [...] especially before the operator

I sympathize, hence #20540 for options next dev cycle. (Will clean that up later.) Best!

Copy link
Contributor

@tkelman tkelman left a comment

Choose a reason for hiding this comment

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

lgtm

@tkelman tkelman added this to the 0.6.0 milestone Feb 13, 2017
@ararslan ararslan merged commit 209945c into JuliaLang:master Feb 13, 2017
@Sacha0 Sacha0 deleted the devecnot branch February 14, 2017 05:25
martinholters added a commit to HSU-ANT/ACME.jl that referenced this pull request Feb 17, 2017
Also fixes deprecation warnings due to JuliaLang/julia#20543.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broadcast Applying a function over a collection deprecation This change introduces or involves a deprecation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants