> > > Do you want to drive me away from learning Haskell? Who the
> hell can try
> > > to write such functions? Is readabilty not a concern in Haskell?
> >
> > I would have to agree, Sven does seem to be working hard to drive a
> > beginner away from Haskell.  But he is illustrating an important
> > coding style.  If we lay his function out on a few more lines, and
> > replace his (|.) = flip (.) operator with the standard functional
> > composition (.), we get the following:
>
> Truthfully I think the forward composition ie (flip (.) ) makes the code
> more natural to read as it can be read do this, than this, than this,
> etc...  As opposed to do this to the result of this to the result of
> this, etc...  The former can be read as a sequence of actions to
> perform.

Good point. The compositional style emphasizes the fact that there is only
one object being transformed here. What can make this style more difficult
to read is all the permutations you need to inject for arguments of standard
operators.

> I just wish a standard operator is chosen for a) flip (.) and b) flip
> ($) instead of having everyone make up their own.  I don't really care
> what it is.  I truthfully like >.> for flip (.) and # for flip ($) but I
> can easily change.

The standard notation for flip (.) is ;, but unfortunately Haskell co-opted
this for lexical purposes...

--FC



Reply via email to