Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: dealing with chained functions (Federico Mastellone)
----------------------------------------------------------------------
Message: 1
Date: Wed, 20 Apr 2011 16:00:43 -0300
From: Federico Mastellone <[email protected]>
Subject: Re: [Haskell-beginners] dealing with chained functions
To: Alec Benzer <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
The first version. It is generally considered a good practice to Increase
Cohesion and Decrease Coupling. Its a very common approach, google it.
On Sun, Sep 5, 2010 at 4:50 AM, Alec Benzer <[email protected]> wrote:
> A) is all I was really asking. I'm not writing a library or exposing
> any functions. I was concerned with how I should write the internals,
> although I see how in certain contexts the latter form may be
> preferable if I was writing a library.
>
> On Sun, Sep 5, 2010 at 3:41 AM, Chadda? Fouch? <[email protected]>
> wrote:
> > On Sat, Sep 4, 2010 at 10:06 AM, Alec Benzer <[email protected]>
> wrote:
> >> No, ya, I get that differences between the two methods, I was asking
> >> if one of them was generally considered better practice than the
> >> other.
> >
> > I think your question is mixing two different concern : A) how you
> > should write your Haskell functions so that you reap most benefit from
> > its functional nature, and B) what functions you should expose in the
> > interface of your libraries.
> >
> > The answer to A) is that you should use the solution that is more
> > composable (the former), the answer to B) really depends on what your
> > library does and the philosophy of your interface... In other words,
> > it may be better in your specific case to expose the latter functions
> > (probably not often but it may happen) but the internals of your
> > library should most likely be written in the former style (it is easy
> > to form the latter functions from the former, while the opposite is
> > quite impossible).
> >
> > --
> > Jeda?
> >
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
--
Federico Mastellone
Ingeniero Inform?tica - ITBA
".. there are two ways of constructing a software design: One way is to make
it so simple that there are obviously no deficiencies, and the other way is
to make it so complicated that there are no obvious deficiencies. The first
method is far more difficult."
Tony Hoare, 1980 ACM Turing Award Lecture.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110420/136fe4ec/attachment-0001.htm>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 34, Issue 34
*****************************************