Skip to content

Commit dde9330

Browse files
committed
Emphasize phantom types are being replaced
1 parent 3bd057f commit dde9330

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/blog/_posts/2018-03-05-seventh-dotty-milestone-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ and how we can use them to model [Algebraic Data Types](/docs/reference/enums/ad
7474
### Ghost terms [#3342](https://github.com/lampepfl/dotty/pull/3342) and removing phantom types [#3410](https://github.com/lampepfl/dotty/pull/3410)
7575
The keyword `ghost` can be placed on parameters, `val` and `def` to enforce that no reference to
7676
those terms is ever used (recursively). As they are never used, they can safely be removed during compilation.
77-
These have similar semantics as _phantom types_ but with the added advantage that any type can be a ghost parameter. They can be used to add implicit type constraints that are only relevant at compilation time.
77+
Ghost terms replace _phantom types_: they have similar semantics, but with the added advantage that any type can be a ghost parameter. They can be used to add implicit type constraints that are only relevant at compilation time.
7878

7979
```scala
8080
// A function that requires an implicit evidence of type X =:= Y but never uses it.

0 commit comments

Comments
 (0)