-
Notifications
You must be signed in to change notification settings - Fork 14
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
Could an second variation on the operator be created so it doesn't with %<-% from future #53
Comments
I'm not particularly familiar with the {future} package, is the |
Yes. Very much. I don’t think future is part of tidyverse, but it is certainly part of the direction R is going in, and is already something of a mainstay. Multiple assignment (via zeallot) is something that R definitely lacks, but multiprocessing, which the future package addresses, is considered more important. I’d really recommend changing the %<-% operator to a similar variation, since anyone or any package that uses future will have to avoid any dependency on zeallot. |
I’m assuming nteetor is the developer. If not, this is meant for the developer. I asked in the OP if a second variant of %<-% could be created, but this would still allow override issues with the future library. Better would be to make it a unique operator. I use %<-c%. Whatever the developer prefers, but I’d really suggest making it unique (not %<-%) so that zeallot can become more mainstream. |
I can appreciate the frustrations of namespace clash. Reading over the "Implicit of Explicit Futures" section found here, https://cran.r-project.org/web/packages/future/vignettes/future-1-overview.html, I see there is an alternative method for {future} that does not require Given that others have requested different changes to the zeallot operator for various reasons, see #29 and #50, I am hesitant to introduce a new operator. This is a slippery slope and I won't be able to make everyone happy. See futureverse/future#207 for the {future}'s author's take on the situation. Unfortunately, {zeallot} was developed and released in the aforementioned That issue also does a good job highlighting why a change to the operator is a poor idea. As I've said before (see #50), I wish multiple assignment were baked into R by default. In the meantime, the |
Would it be a good idea to suggest the R Core Team add |
I’d second that. I don’t use python much, but the ability to return / update multiple variables at once From a function call is one of the features that impressed me about it. |
Since %<-% is also used by future and the usage of namespaces with operators is a little messy zeallot::
%<-%
(c(a, b), c(1, 2)) to differentiate between the different overrides of the operator, could a second alternative variation be created. It's a really useful operator, adding one of the pieces of functionality that r misses vs python. For my own use I've cloned and changed the operator to %<-c%, but I guess anything would work.The text was updated successfully, but these errors were encountered: