Clarify the reasons for dropping existentials
See original GitHub issueDotty documentation lists three reasons why existentials were dropped.
- Existential types violate a type soundness principle on which DOT and Dotty are constructed. That principle says that every prefix (
p
, respectvelyS
) of a type selectionp.T
orS#T
must either come from a value constructed at runtime or refer to a type that is known to have only good bounds.
Can this be illustrated on an example? What’s a snippet of code that uses existentials and is problematic in this respect?
- Existential types create many difficult feature interactions with other Scala constructs.
This is a little too vague of an explanation for users who are going to miss existentials.
- Existential types largely overlap with path-dependent types, so the gain of having them is relatively minor.
I disagree that the gain is minor.
Issue Analytics
- State:
- Created 5 years ago
- Comments:22 (18 by maintainers)
Top Results From Across the Web
Existentialism | Internet Encyclopedia of Philosophy
This very broad definition will be clarified by discussing seven key themes that existentialist thinkers address. Those philosophers considered existentialists ...
Read more >Existentialism - Stanford Encyclopedia of Philosophy
Husserl employed this method to clarify our experience of nature, ... His sole justification is what Kierkegaard calls the passion of faith.
Read more >Existentialism - Wikipedia
Existentialism is a form of philosophical inquiry that explores the problem of human existence and centers on human thinking, feeling, and acting.
Read more >Dropped: Existential Types - Scala 3 - EPFL
The reasons for dropping them are: Existential types violate a type soundness principle on which DOT and Scala 3 are constructed. That principle...
Read more >A student's guide to Jean-Paul Sartre's Existentialism and ...
The truth about the horrors of Auschwitz and Dachau was emerging; the atom bomb had been dropped for the first time – evidence...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
Top Related Hashnode Post
No results found
Top GitHub Comments
@TomasMikula You can make a newtype for existentials which works pretty well in Scala2 and doesn’t box.
Hah, I love this quote! I’d never seen it before, but I totally get it. Sorry the work doesn’t help y’all except to warn just how complicated the problem gets.
I have other work on checking/inferring existential types, but unfortunately it doesn’t work for impredicative existential types, which is the case y’all particularly care about. Nonetheless, there are probably some useful lessons to learn from the predicative case if y’all are interested.