Skip to content

Commit c8821b9

Browse files
committed
Layout changes
1 parent f1d6ce4 commit c8821b9

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

blog/_posts/2016-02-17-scaling-dot-soundness.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@
22
layout: blog
33
post-type: blog
44
by: Martin Odersky
5-
title: Scaling DOT to Scala: Soundness
5+
title: Scaling DOT to Scala - Soundness
66
disqus: true
77
---
88

99
In my [last
1010
blog](http://www.scala-lang.org/blog/2016/02/03/essence-of-scala.html)
1111
I introduced DOT, a minimal calculus that underlies much of Scala.
1212
DOT is much more than an academic exercise, because it gives us
13-
guidelines how to design a sound type system for full Scala. As was
14-
argued in the previous blog post, the danger a path-dependent type
13+
guidelines how to design a sound type system for full Scala.
14+
15+
## Recap: The Problem of Bad Bounds
16+
17+
As was argued in the previous blog post, the danger a path-dependent type
1518
system like Scala's faces is inconsistent bounds or aliases. For
1619
instance, you might have a type alias
1720

@@ -39,6 +42,8 @@ that check is easy: When objects are created, we know their class and
3942
we can insist that all nested types in that class are aliases or
4043
have consistent bounds. So far so good.
4144

45+
## Loopholes Caused by Scaling Up
46+
4247
But if we want to scale up the DOT result for full Scala, several
4348
loopholes open up. These come all down to the fact that the prefix of
4449
a type selection might _not_ be a value that's constructed with a
@@ -86,6 +91,8 @@ any type you choose. Such a feat is an impossible promise, of
8691
course. The promise is usually broken at run-time by failing with a
8792
`ClassCastException`.
8893

94+
## Plugging the Loopholes
95+
8996
To get back to soundness we need to plug the loopholes. Some of the
9097
necessary measures are taken in pull request [#1051](https://github.com/lampepfl/dotty/issues/1051).
9198
That pull request

0 commit comments

Comments
 (0)