Flipped function application
Edward A Kmett
ekmett
Wed Oct 9 22:40:14 UTC 2013
I've referred this question to the core libraries committee for a binding decision about including it or not, and recused myself from the discussion. We should get some closure about this issue this way.
The previous proposal was unilaterally withdrawn, but there still appear to be stalwarts on both sides.
That is about all I can reasonably do.
-Edward
> On Oct 9, 2013, at 5:53 PM, Wvv <vitea3v at rambler.ru> wrote:
>
> Because we are talking about 2 lines of code (15 non-space symbols) outside
> of the core, the question is a bit different: do you want to guide the
> process, or do you prefer to see how this process become completely
> non-controllable?
>
> I really-really don't understand when at some languages people say "It's
> nice language, but don't use build lib, use extension/battery lib".
> Sometimes it became even dramatic, like D language, when extended library
> (Tango) was incompatible (at D1 times) with the standard one.
>
> This is looks like OCaml has neither (.), nor ($). Fortunately,
> OCaml-Batteries add :
>
> val (|>) : 'a -> ('a -> 'b) -> 'b
> val (<|) : ('a -> 'b) -> 'a -> 'b
> val (|-) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c
> val (-|) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
> val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
> val curry : ('a * 'b -> 'c) -> 'a -> 'b -> 'c
> val uncurry : ('a -> 'b -> 'c) -> 'a * 'b -> 'c
> val const : 'a -> 'b -> 'a
>
> I don't want Haskell be like OCaml and use Data.Lens/other package for using
> simplest (&/#/<:/|>/..) function!
>
>
>
> Niklas Haas wrote
>> On Wed, 9 Oct 2013 11:51:39 -0700 (PDT), Wvv <
>
>> vitea3v@
>
>> > wrote:
>>> It's looking very strange, that such easy function as flipped function
>>> application is still absent at the base.
>>
>> I'm not convinced the stylistic differences to ($) are really worth
>> adding it as a distinct combinator, at least for general-purpose code.
>>
>> It works nicely for lens because it lets you mimic the appearance of
>> record update syntax, but it might not be the best idea to introduce it
>> as an entirely separate idiom - seeing as it could cause lots of
>> unnecessary code complexity and confusion.
>> _______________________________________________
>> Libraries mailing list
>
>> Libraries@
>
>> http://www.haskell.org/mailman/listinfo/libraries
>
>
>
>
>
> --
> View this message in context: http://haskell.1045720.n5.nabble.com/Flipped-function-application-tp5738131p5738150.html
> Sent from the Haskell - Libraries mailing list archive at Nabble.com.
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
More information about the Libraries
mailing list