I've seen some cases where Haskell examples dive into existential types instead of using natural higher order functions. For instance, the "Existential type" wiki page [1] section 2.2 proposes existentials as the solution to a heterogeneous list problem where a ray-tracer must evaluate a trace function for different types of objects. Is there a good reason for this, or is it just a case of prior language assumptions leading to unnatural code? Why could I not just make the list homogeneous by supplying a list of partially evaluated trace functions instead?
Sometimes I read an argument that existentials are required due to unknown constraints at compile time, but do not have an intuition for this situation yet. For instance, I read that IO requires existentials. Still working on that one. :)
Cheers,
Darren