|
|
|
|
|
by horia_
4622 days ago
|
|
Interfaces are the most salient feature on my mind. Secondarily, I really like Ruby meta-programming with it's ability to inject an anonymous class in the middle of the inheritance hierarchy. But Haskell isn't object oriented so I don't know how it might support such features. |
|
Basically, you can do the same things but not necessarily in the same ways. For example, Haskell does not have any inheritance the way OO languages do, so that simply doesn't come up. This doesn't mean it's less capable--it just means it's different. Very different.
One example is interfaces: in Haskell, depending on the context, you might use the module system, typeclasses or even just normal types to accomplish the same things as an OOP interface. You can still organize your code in a similar way, but the actual mechanics are different. In fact, since Haskell allows you to explicitly control effects, you have more organizational power!
I hope this clears things up. Ultimately, the details of how you can organize things is going to vary per use case. Perhaps the easiest thing to do is just to pick up basic Haskell and see what larger Haskell programs look like.