Thank you, Jesper, that's very interesting.
On Sunday, June 19, 2016 at 8:15:13 AM UTC-7, Jesper Louis Andersen wrote:
>
>
> On Sat, Jun 18, 2016 at 5:32 AM, Tyler Compton > wrote:
>
>> I don't pretend to be proficient in this realm of functional programming,
>> but I would be very surprised if
On Sat, Jun 18, 2016 at 5:32 AM, Tyler Compton wrote:
> I don't pretend to be proficient in this realm of functional programming,
> but I would be very surprised if this is valuable in a language like Go
> that can and does hold state.
In functional languages, it is often used as a way to "conf
> this seems like an eyesore and maintenance concern. (...) it does cause
me to hear code review sirens going off in the distance.
Then why would you want to use currying in Go at all? What's the point of
being able to write f(1)(2)(3) instead of f(1,2,3) *in a non-functional
language?* Especi
I would also like to hear from somebody about a real world use-case. I
don't pretend to be proficient in this realm of functional programming, but
I would be very surprised if this is valuable in a language like Go that
can and does hold state. That said, this is very cool and I would love to
b
Note that Go's reflect package is powerful enough to implement
currying directly, though you do have to convert back to the expected
type in order to call the function.
https://play.golang.org/p/2ukRfHGnlT
Ian
--
You received this message because you are subscribed to the Google Groups
"golang
Currying is translating the evaluation of a function with multiple arguments
into evaluating a sequence of functions with one argument. Not sure how this
doesn't qualify, even if a closure was used to accomplish this.
As for the value, at the very least there is the same value as using closures
What is the point of doing that in a language that doesn't support auto
currying ? There is none. You are not currying anything by the way, you
just wrote 3 closures.
Le vendredi 17 juin 2016 00:00:43 UTC+2, Zauberkraut a écrit :
>
> Hello,
>
> Go enables the evaluation of functions using curry
I played around tonight trying to come up with a better way, but instead I
came up with 2 decidedly worse ways (particularly considering
readability/maintenance is the primary concern of the question). I think
they're novel enough to share!
https://play.golang.org/p/w9YxsEFlF8
1) Original
2)
Go allows functions to have multiple arguments. The upside is currying is much
less necessary in languages like Go. The downside is combining one-argument
functions to make new one-argument functions is syntactically more cumbersome.
--
You received this message because you are subscribed to
Note the _excessive_ caveat. Used with some restraint I think it is a very
powerful construct.
On Fri, Jun 17, 2016, 03:42 adonovan via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> On Thursday, 16 June 2016 18:00:43 UTC-4, Zauberkraut wrote:
>>
>> would an extended usage of this paradigm
On Thursday, 16 June 2016 18:00:43 UTC-4, Zauberkraut wrote:
>
> would an extended usage of this paradigm be considered unidiomatic in Go?
>
Short answer: yes. Excessive use of function values as arguments and
results of other functions can make the flow of control hard to follow.
--
You recei
11 matches
Mail list logo