Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • Thank you. Could you please elaborate a bit your last paragraph ("obvious" might be a bit subjective). Commented Mar 17, 2014 at 19:37
  • Already did.... Commented Mar 17, 2014 at 19:37
  • 1
    @Hyperboreus There are many ways to achieve polymorphism. Subtyping with dynamic dispatch, static ad-hoc polymorphism (aka. function overloading) and parametric polymorphism (aka generics) are the most common ways to do that, and all ways have their strengths and weaknesses. Modern OOP languages combine all these three ways, whereas Haskell primarily relies on parametric polymorphism and ad-hoc polymorphism. Commented Mar 17, 2014 at 20:11
  • 3
    @RobertHarvey You say that you need mutability because you need to loop (otherwise you have to use recursion). Before I started using Haskell two years ago, I thought I needed mutable variables, too. I'm just saying there's other ways to "loop" (map, fold, filter, etc.). Once you take looping off the table, why else would you need mutable variables? Commented Mar 18, 2014 at 16:16
  • 1
    @RobertHarvey But this is exactly the point of programming languages: What is exposed to you and not what is happening under the hood. The latter is the responsability of the compiler or interpreter, not of the application developper. Otherwise back to assembler. Commented Mar 18, 2014 at 16:55