I've sometimes heard that using existential data types is sort of a bad practice in functional programming and that there are ways how to avoid it. I'd like to know, if it is really true, what are the reasons for (not) using existentials, and perhaps how to convert common code patterns that use them into patterns that don't.
Tell me more
×
Programmers Stack Exchange is a question and answer site for
professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.
closed as not constructive by Eric Lippert, gnat, Mike Brown, GlenH7, Martijn Pieters Feb 25 at 18:44
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.
I've sometimes heard that using existential data types is sort of a bad practice-- Citation, please. I did a bit of research on Google, and couldn't find a single instance of someone saying they were bad. In fact, most people are quite complimentary about them. – Robert Harvey Jan 27 at 1:07