Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can do OOP-like code on Haskell too... Just don't show your code for experienced Haskell developers.


If it's the right solution then an experienced Haskell developer will congratulate you. If it's the wrong solution they'll point you towards a functional solution which likely works better with the language/paradigm.


That was intended as a joke, but not completely. Emulating OOP seems to be deeply frowned upon by Haskell developers.

That is, until you actually do it; I don't think I ever saw people complaining about any actual instance of OOP-like code, just about the idea.


> Emulating OOP seems to be deeply frowned upon by Haskell developers.

Are you sure? I don't think many frown upon the Yi developers for it:

http://yi-editor.github.io/2014/09/05/oop/

> That is, until you actually do it; I don't think I ever saw people complaining about any actual instance of OOP-like code, just about the idea.

Sometimes there is something to complain about ;)

I remember listening to a Haskell Cast with Michael Snoyman and/or Gabriel Gonzalez of the Conduit and Pipes fame... whoever it was mentioned that their early designs were very imperative because they thought it was necessary for performance.

However over time a functional API/core emerged and was more stable and performant.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: