Skip to content
Discussion options

You must be logged in to vote

IMO currying and overloading don't mix well within a language. Other .NET languages like F# seem to only permit one or the other in different circumstances. Currying and partial application can definitely be useful, but I feel that they're both generally niche and the language already makes it pretty easy to curry via creating a lambda at the call site which captures specific arguments.

Also, the code generation you suggested seems inefficient, requiring 3 allocations and 3 virtual dispatches per call. Languages like Scala, which have a similar syntax, flatten the curried function into a normal function that would take 3 parameters, but allow you to apply the arguments from the first para…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by YairHalberstadt
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #2920 on November 09, 2020 10:04.