I have asked a bad question here Why are type theorhetic data structures rarer (than sets) if they are fundamental?
It got closed for being bad but miraculously got re-opened, perhaps because I made it a bit less bad. However, it was still attracting downvotes and so is still a bad question.
I've tried a substantial rewrite but I am actually not sure if I can anything further to make it better?
I think I could make my question clearer if I knew the answer but if I knew the answer I wouldn't have asked.
Since my latest rewrite (or perhaps because of the meta effect) it is again in danger of being closed.
The timeline feature (why is it buried?) is useful here
Any advice on how to rescue it?
Let me try to summarise my thinking about this question in a really dumb way:
- We have a sets right? They are pretty good data structures*.
- They come from set theory.
- Set theory and type theory can both be used in a similar way as the foundation of maths.
- So sets and types are in a sense interchangable.
- A lot of programming is already based on types.
- Why isn't support for "type theory" more popular.
- Why are programmers (some at least) more likely to think in terms of sets.
My thinking in terms of possible answers is:
- There are some flaws in my reasoning above - tell me about them
- There are trade offs making set theory more useful than type theory - tell me about them.
- Actually type theory is popular
- Maybe you just see it more in functional programming or academia.
- If you just searched for this term you'd find hundreds of implementations of bits of type theory in these mainstream languages
- Type theory is hard
- There are many competing type theories / systems so its not so easy to describe "type theory" as it is "set theory"
So I sort of know a bit of the answer but would like to hear from the community.
*channelling Graham Chapman