[Haskell-cafe] Need ideas how to model the lack of something

Joachim Durchholz jo at durchholz.org
Mon Dec 14 06:28:49 UTC 2015


Am 14.12.2015 um 01:28 schrieb Kim-Ee Yeoh:
> On Mon, Dec 14, 2015 at 3:15 AM, martin <martin.drautzburg at web.de> wrote:
>
>> I started like this
>>
>> data C a = C {
>>              insert :: a -> Maybe (C a),
>>              remove :: Maybe (a, C a)
>>          }
>>
>> but I could not implement anything sensible on top of this.
>>
>
> And the reason you're stuck implementing anything sensible on top of this
> is because you've written an OOP-style specification of a data structure.

Mmm... this is the second time this has been raised.
What's the problem with OOP style? Something specific with Haskell, 
something about OOP in general, something else?

Regards,
Jo


More information about the Haskell-Cafe mailing list