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

Thomas Koster tkoster at gmail.com
Tue Dec 15 00:40:03 UTC 2015

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. Haskell is
not a multi-paradigm language like Scala.

Thomas Koster

More information about the Haskell-Cafe mailing list