Can you give an example of a situation where Haskell type checking gets in your way? Not to take issue, but because I'm a collector. I've been told that it's not that easy to make a list of functions in Haskell unless they all have the same input and output types, which seems restrictive to me.
It's not "easy" to make a list, but instead maybe you would be able to work with a tuple (which is easy).
More practically, Haskell is going to ask you implicitly why you want a heterogenous list of functions. In all likelihood they're going to have a common interface at some point and you abstract around that so that the list is still "homogenous" (which is harder, but still pretty easy).
Well, polymorphic lists are one thing that are somewhat awkward. Other thing is that a small change in some part of program (say introducing an additional parameter, or having to use IO or state) can require massive changes in rest of the program, or a PhD in category-theory.
Comments
Can you give an example of a situation where Haskell type checking gets in your way? Not to take issue, but because I'm a collector. I've been told that it's not that easy to make a list of functions in Haskell unless they all have the same input and output types, which seems restrictive to me.
It's not "easy" to make a list, but instead maybe you would be able to work with a tuple (which is easy).
More practically, Haskell is going to ask you implicitly why you want a heterogenous list of functions. In all likelihood they're going to have a common interface at some point and you abstract around that so that the list is still "homogenous" (which is harder, but still pretty easy).
Well, polymorphic lists are one thing that are somewhat awkward. Other thing is that a small change in some part of program (say introducing an additional parameter, or having to use IO or state) can require massive changes in rest of the program, or a PhD in category-theory.