Skip to content

Update existential-types.md #3034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docs/docs/reference/dropped/existential-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ title: Dropped: Existential Types
Existential types using `forSome` have been dropped. The reasons for dropping them were:

- Existential types violate a type soundness principle on which DOT
and Dotty are constructed. That principle says that every the
and Dotty are constructed. That principle says that every
prefix (`p`, respectvely `S`) of a type selection `p.T` or `S#T`
must either come from a value constructed at runtime or refer to a
type that is known to have only good bounds.

- Existential types create many difficult feature interactions
with other Scala constructs.

- Existential types have large overlap with path-dependent types,
- Existential types largely overlap with path-dependent types,
so the gain of having them is relatively minor.

Existential types that can be expressed using only wildcards (but not
Expand All @@ -29,5 +29,4 @@ of `Int`.

When reading classfiles compiled with _scalac_, Dotty will do a best
effort to approximate existential types with its own types. It will
issue a warning is a precise emulation is not possible.

issue a warning that a precise emulation is not possible.