Skip to content

Commit 4231a5a

Browse files
committed
phrasing tweaks
1 parent 7ea3cbd commit 4231a5a

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

blog/_posts/2016-11-17-splash.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ there are so many of them around.
2020
SPLASH is a set of conferences running together (OOPSLA being one of
2121
the main ones), so you get exposed to a variety of topics and get to
2222
talk to people from many different areas. One talk that stood out for
23-
me was Simon Peyton Jones speaking about how they reform the UK
23+
me was Simon Peyton Jones speaking about how they are reforming the UK
2424
curriculum to teach computational thinking to kids from primary school
2525
on. It's been Simon's main "other" occupation besides Haskell and he
2626
gave a fascinating talk that conveyed his great enthusiasm for the
@@ -29,21 +29,21 @@ was that we have to act now, when things are waiting to be defined. A
2929
quote: "We know we have failed if, 10 years from now, the outcome is
3030
just that every kid can code Java".
3131

32-
At the Scala Symposium I was talking about how we implemented
32+
At the Scala Symposium I spoke about how we implemented
3333
higher-kinded types in Dotty. This was a long and often painful
34-
journey. We tried overall four different approaches. Each of them was
34+
journey. In total we tried four different approaches. Each of them was
3535
an effort of many weeks -- sometimes several months -- to implement
3636
the new scheme, debug it, and then finally discard it because we found
37-
out it was too hard to get right, or did not live up otherwise to
37+
out it was too hard to get right, or did not otherwise live up to
3838
expectations.
3939

4040
The original reason for trying so many different avenues had to do
4141
with DOT, which is intended to be the foundation of future Scala. DOT
42-
as is has no provision for higher-kinded types, but it turns out
42+
as-is has no provision for higher-kinded types, but it turns out
4343
that a restricted version of higher-kinded types can be
4444
straightforwardly encoded in it. That issue is not just academic
4545
because the _dotty_ compiler uses DOT's constructs as its core data
46-
structures. So what is hard to do in DOT tends to hard to implement in
46+
structures. So what is hard to do in DOT tends to be hard to implement in
4747
the compiler as well.
4848

4949
Originally, we played with the idea to restrict higher-kinded types to
@@ -53,18 +53,17 @@ forced us to restrict the Scala language. More advanced idioms, such
5353
as type classes for `Monad` and `Functor` would have required rewrites
5454
and would not be as convenient to use. The boundary between what was
5555
expressible and what was illegal was also not very intuitive. For instance,
56-
one could define an abstract polymorphic subtype of `Maps` in the usual way:
57-
56+
one could define an abstract polymorphic subtype of `Map`s in the usual way:
5857

5958
type M[K, V] <: Map[K, V]
6059

61-
But one would could not define a type where the parameters were reversed. I.e.
60+
But one could not define a type where the parameters were reversed. I.e.
6261

6362
type M[V, K] <: Map[K, V]
6463

6564
would have been illegal.
6665

67-
To address these limitations, we played then with two more complicated
66+
To address these limitations, we then played with two more complicated
6867
encodings of higher-kinded types in _dotty_'s core types. Neither of
6968
these worked out very well so in the end we settled for the "brute
7069
force" approach of adding higher-kinded types without trying to re-use
@@ -83,5 +82,3 @@ works out it would be a case where compiler hacking influenced the way
8382
we do theory. It's usually more efficient to do theory first and
8483
implement it systematically once it's done, but sometimes going from
8584
practice to theory is the only route available.
86-
87-

0 commit comments

Comments
 (0)