
On Mon, Dec 14, 2015 at 3:15 AM, martin
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
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?
On 15 December 2015 at 11:40, Thomas Koster
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.
On 15/12/2015 15:33, Joachim Durchholz wrote:
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?
Sorry, my answer was specifically to your question: "What's the problem with OOP style [in Haskell]?" It doesn't help Martin. -- Thomas Koster