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 map!(f, A) (and asyncmap!(f, A)) for a cycle #19721

Merged
merged 1 commit into from
Dec 31, 2016

Conversation

Sacha0
Copy link
Member

@Sacha0 Sacha0 commented Dec 25, 2016

#12277 discusses the discrepancy between map!(f, A) (= map!(f, A, A)) and broadcast!(f, A) = (A <- [f() for a in A]. Sentiment in #12277 leans towards map!(f, A) and broadcast!(f, A) having consistent semantics, specifically broadcast!(f, A)'s semantics for consistency with map!/broadcast! methods accepting more arguments.

As an experiment, this pull request deprecates map!(f, A) (and analog asyncmap!(f, A)) in favor of map!(f, A, A) (asyncmap!(f, A, A)) such that map!(f, A)'s (asyncmap!(f, A)'s) semantics can change in a future release without silent breakage.

Thoughts? Best!

(I expect the modification of map!(f, A::SharedArray) isn't quite correct. Someone with knowledge of SharedArrays should have a look at that.)

@Sacha0 Sacha0 added the broadcast Applying a function over a collection label Dec 25, 2016
@Sacha0 Sacha0 force-pushed the deptwoargmapbang branch 2 times, most recently from 28c2b1d to acbfc5d Compare December 26, 2016 02:14
Copy link
Contributor

@amitmurthy amitmurthy left a comment

Choose a reason for hiding this comment

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

SharedArray changes seem fine.

@Sacha0
Copy link
Member Author

Sacha0 commented Dec 27, 2016

SharedArray changes seem fine.

Cheers, thanks for reviewing!

@Sacha0
Copy link
Member Author

Sacha0 commented Dec 29, 2016

Candidate for 0.6? Removing the [RFC] and tentatively adding to the 0.6 milestone. Best!

@Sacha0 Sacha0 added this to the 0.6.0 milestone Dec 29, 2016
@Sacha0 Sacha0 changed the title [RFC] Deprecate map!(f, A) (and asyncmap!(f, A)) for a cycle Deprecate map!(f, A) (and asyncmap!(f, A)) for a cycle Dec 29, 2016
In anticipation of changing map! and asyncmap!'s semantics such that they are consistent with map! and asyncmap! methods accepting more than two arguments, deprecate two-argument map! and asyncmap!.
@Sacha0
Copy link
Member Author

Sacha0 commented Dec 30, 2016

(Thanks for the rebase @tkelman! Almost caught up...)

@tkelman tkelman merged commit 26c8d85 into JuliaLang:master Dec 31, 2016
@Sacha0 Sacha0 deleted the deptwoargmapbang branch December 31, 2016 04:23
@Sacha0
Copy link
Member Author

Sacha0 commented Dec 31, 2016

Thanks for reviewing / merging!

@tkelman tkelman added the needs news A NEWS entry is required for this change label Dec 31, 2016
JeffBezanson pushed a commit that referenced this pull request Dec 31, 2016
In anticipation of changing map! and asyncmap!'s semantics such that they are consistent with map! and asyncmap! methods accepting more than two arguments, deprecate two-argument map! and asyncmap!.
@Sacha0 Sacha0 removed the needs news A NEWS entry is required for this change label May 12, 2017
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants