State of currying-PR

I have found this PR from years ago:

I would love this feature, and I am not alone. Does anyone have a status/summary on this? The discussion is too technical at several points for me to follow.

It seems like perfect is being the enemy of the good, and that is such a shame for such a highly-requested feature. Would it be possible to reach a consensus based on some type of voting?

9 Likes

I also cannot speak for all the technical language discussions in that PR but as a user i would love that feature too. So IMHO this would enhance my programming experience in Julia. :slightly_smiling_face:

The end of the discussion mentions a test PR by Simeon (test parser support for underscore curry by simeonschaub · Pull Request #40860 · JuliaLang/julia · GitHub). So, work is being done but it looks like this functionality would break many packages

The original version of the functionality in the PR (a Scala-like “tight-binding” syntax) was not breaking because it did not change the AST (and it only affected code that is currently an error).

The thing that is breaking is to try to implement a more expansive binding of the underscore by inserting new AST nodes.

6 Likes

I’m definitely in favor of the PR in its original version. Then maybe in 2.0 we can get rid of the special currying methods for >, ==, startswith, etc.

Came also across this PR the other day. Certainly a feature I would love to see. More so since the base R pipe which has been added in R 4.1 will supposedly support an underscore operator with the same functionality in R 4.2 (would be neat to have roughly the same base piping functionalities in both languages without extra packages).

4 Likes

Do you have a link for this? It would be nice to see what semantics they chose.

I was looking for it, but couldn’t find it (but I also have heard, and not read about it iirc). I spent some more time checking and so far no changes to the pipe implementation have been made in 4.2 dev if I can tell correctly (usually I am not that deep into language internals). r-svn/gram.c at master · r-devel/r-svn · GitHub

Edit: Also on svn https://svn.r-project.org/R/trunk/src/main/gram.c

If I get any details on this I surely will remember to post them here though.

Maybe some more info pops up there as well.

2 Likes

if it’s breaking then maybe that PR should get a 2.0 milestone? would love to have this feature too.

1 Like