3 ms·
Kudos for the named funs. Care to provide some "marketing" about what they allow for? (besides and in addition to what is already in the eep-0037(?)) Why are
by pointernil 13y ago
Kudos for the named funs.
Care to provide some "marketing" about what they allow for? (besides and in addition to what is already in the eep-0037(?))
Why are they important? How will they support developers in writing and understanding erlang code? Do they provide even some internal/resp performance benefits?
Reg. the piping syntax: how is your proposition making the "transformation" more obvious for the reader of some application code?
To me it seams partial appl. is the more powerful feature for sure. Together with a rather "simple" |> operator it could provide the fun piping functionality. It looks like a map function is needed to wrap other functions taking part in the piping, right? Is that the "make it obvious" part you mentioned?
The piping syntax from elixir (from the joe blog above) on the other hand binds the |> operator to a more specialized, less flexible "fun call" transformation providing fun piping only, right?
Anyways, thanks for insights and again really kudos for the named funs.
- nox_ 13y agoWith my two orthogonal syntaxes, there is no transformation. "|>" doesn't need to look at its operands to be implemented. With a macro, you have a call to foo/N end up a call to foo/N+1. Also, coming from a functional background, where I read "X |> F()", I think "(F())(X)", not "F(X)".