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

Joachim Durchholz jo at durchholz.org
Tue Dec 15 07:33:53 UTC 2015

Am 15.12.2015 um 01:40 schrieb Thomas Koster:
> 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.
> Am 14.12.2015 um 01:28 schrieb Kim-Ee Yeoh:
>> 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.
> On 14 December 2015 at 17:28, Joachim Durchholz <jo at durchholz.org> wrote:
>> 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?
> Nothing nefarious: Object-oriented style in Haskell is wordy and
> unnatural for no other reason than that Haskell is a functional
> programming language and not an object-oriented language.

I see Kim-Ee Yeoh stating that Martin is stuck without a way forward due 
to using OO style, which seems more serious than just "wordy and unnatural".
Or am I misreading his words, and that "OO-style" reference was just 
descriptive rather than presenting the base cause of Martin's problems?


P.S.: I'm not trying to criticize anything, just trying to understand 
what the issue is.
Is there a webpage like "Haskell for OO-warped minds" that explains how 
to transition one's idioms? I have a good grasp of Haskell in-the-small, 
but I haven't had an opportunity to learn the larger-scale issues, so 
I'm probably just being dense and would like to change that.

More information about the Haskell-Cafe mailing list