haskell-cafe@haskell.org
[Top] [All Lists]

Re: [Haskell-cafe] Re: Data.Ring -- Pre-announce

Subject: Re: [Haskell-cafe] Re: Data.Ring -- Pre-announce
From: John Van Enk
Date: Mon, 4 Jan 2010 09:19:53 -0500
I've heard this a few times and am slowly becoming convinced of it. I'll try my current use without the Empty and see how it goes.

Given that I've heard this from several places, I'll probably drop Empty.

On Mon, Jan 4, 2010 at 9:17 AM, Luke Palmer <lrpalmer@xxxxxxxxx> wrote:
On Mon, Jan 4, 2010 at 6:51 AM, Maciej Piechotka <uzytkownik2@xxxxxxxxx> wrote:
> About comonad - not exactly as every comonad is copointed and the only
> possible way is extract Empty = _|_

I think this module could be cleaned up by disallowing empty lists.
You have this nice semantic property that "every clist has a focus",
but when you add empty you have to add "unless it's empty".  focus
returns a Maybe, isEmpty is necessary.

I mean, it could be that your use case requires empty clists and would
be uglier without empty, but think about it.  I find in Haskell that
simplicity breeds simplicity; i.e. I'm willing to wager that whatever
algorithm you are using clist for will actually be cleaner if you got
rid of empty and modify the algorithm accordingly.  We shall see
though...

Luke
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe
<Prev in Thread] Current Thread [Next in Thread>