aboutsummaryrefslogblamecommitdiff
path: root/index.html
blob: 3146a5e383bb4bcec080971d8e38cfc4c8a6402a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426














                                                                                                
 

























































































































































































































































































































































































































                                                                                                                                                                                                         
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <meta http-equiv="x-ua-compatible" content="ie=edge">

        <title>Dotty</title>

        <link
            rel="stylesheet"
            href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css"
            integrity="sha384-AysaV+vQoT3kOAXZkl02PThvDr8HYKPZhNT5h/CXfBThSRXQ6jW5DO2ekP5ViFdi"
            crossorigin="anonymous"
        >

        <link
            rel="stylesheet"
            href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"
        >

        <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

        <link
            rel="stylesheet"
            href="./css/dottydoc.css"
        >

        <link
            rel="stylesheet"
            href="./css/color-brewer.css"
        >

        
        <link
            rel="stylesheet"
            href="./css/animate.css"
        >
        
        <link
            rel="stylesheet"
            href="./css/default.css"
        >
        
    </head>
    <body>

        <div id="content">
    <div class="page red exactly-one-page">
    <div id="header">
        <nav class="nav nav-pills">
            <li class="nav-item">
                <a class="nav-link" href="#why-dotty">
                    FAQ
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="./blog/index.html">
                    Blog
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="./docs/index.html">
                    Docs
                </a>
            </li>
            <!--
            <li class="nav-item">
                <a class="nav-link" href="#build-status">
                    Community Projects
                </a>
            </li>
            -->
            <li class="nav-item">
                <a class="nav-link" href="https://github.com/lampepfl/dotty">
                    <img id="github-logo" src="./images/github-logo.svg" />
                </a>
            </li>
        </nav>
    </div>
    <div id="mobile-header">
        <nav class="navbar navbar-light">
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsed-header" aria-controls="collapsed-header" aria-expanded="false" aria-label="Toggle navigation">
                &#9776;
            </button>
            <div class="collapse" id="collapsed-header">
                <div class="bg-inverse p-a-1">
                    <ul>
                        <li class="nav-item">
                            <a class="nav-link" href="#why-dotty">
                                FAQ
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="./blog">
                                Blog
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#getting-started">
                                Getting Started
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#build-status">
                                Community Projects
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="https://github.com/lampepfl/dotty/wiki">
                                Wiki
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="https://github.com/lampepfl/dotty">
                                <img id="github-logo" src="./images/github-logo.svg" />
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
    </div>
    <div class="scala-logo-container">
        <p><img src="./images/scala-logo.svg" alt="image" /></p>
        <div class="centered-subtitle">
            <h1 id="dotty">Dotty</h1>
            <p>A next generation compiler for Scala</p>
            <a href="#why-dotty">
                <i id="scroll-down-arrow" class="animated infinite pulse material-icons">
                    expand_more
                </i>
            </a>
        </div>
    </div>
</div>


    <div class="page blue">
    <div class="centered questions">
        <h1 id="why-dotty">Why Dotty?</h1>
        <p>
            Dotty is a platform to try out new language concepts and compiler
            technologies for Scala. The focus is mainly on simplification. We
            remove extraneous syntax (e.g. no XML literals), and try to boil
            down Scala’s types into a smaller set of more fundamental
            constructors. The theory behind these constructors is researched in
            <a href="https://infoscience.epfl.ch/record/215280">DOT</a>, a
            calculus for dependent object types.
        </p>

        <h1 id="is-it-the-future-scala">Is it the future Scala?</h1>
        <div class="centered-text">
            <p>Yes, it will be - eventually.</p>
        </div>

        <h1 id="can-i-use-it">Can I use it?</h1>
        <div class="centered-text">
            <p>
                <a href="#getting-started">You can!</a> But it currently comes with
                no guarantees of stability.
            </p>
        </div>

        <h1 id="is-there-scala-2-interop">Is there Scala 2 interop?</h1>
        <div class="centered-text">
            <p>
                Dotty currently interops with libraries compiled with Scala
                2.11 - but not 2.12
            </p>
        </div>

        <h1 id="how-do-i-migrate-my-code-to-dotty">How do I migrate my code to Dotty?</h1>
        <p>
            An automated rewriting tool is planned for Dotty, more on this to come.
            Scala 2 sources can be compiled to some degree by issuing:
        </p>
        <pre class="sourceCode bright"><code>./bin/dotc -language:Scala2 file.scala</code></pre>
        <p>when compiling your program.</p>

        <h1 id="whos-working-on-it">Who’s working on it?</h1>
        <div class="contributors">
            <div class="contributors-cell">
                <div class="contributor">
                    <a href="http://github.com/odersky">
                        <img src="./images/martin.jpg">
                    </a>
                    Martin Odersky
                </div>

                <div class="contributor">
                    <a href="http://www.d-d.me">
                        <img src="./images/petrashko.png">
                    </a>
                    Dmitry Petrashko
                </div>

                <div class="contributor">
                    <a href="http://guillaume.martres.me/">
                        <img src="./images/smarter.jpg">
                    </a>
                    Guillaume Martres
                </div>
            </div>
            <div class="contributors-cell">
                <div class="contributor">
                    <a href="http://fengy.me/">
                        <img src="./images/fengyun.png">
                    </a>
                    Liu Fengyun
                </div>

                <div class="contributor">
                    <a href="https://github.com/felixmulder">
                        <img src="./images/felix.jpeg">
                    </a>
                    Felix Mulder
                </div>

                <div class="contributor">
                    <a href="https://github.com/nicolasstucki">
                        <img src="./images/nico.png">
                    </a>
                    Nicolas Stucki
                </div>
            </div>
            <div class="contributors-cell">
                <div class="contributor">
                    <a href="http://github.com/OlivierBlanvillain">
                        <img src="./images/olivier.jpeg">
                    </a>
                    Olivier Blanvillain
                </div>
            </div>
        </div>

        <div class="centered-text">
            <p>
                And a long line of
                <a href="https://github.com/lampepfl/dotty/graphs/contributors">
                    contributors!
                </a>
            </p>
        </div>
    </div>
</div>


    <div class="page teal">
    <div class="centered questions">
        <h1 id="so-features">So, features?</h1>
        <div class="centered-table">
            <table>
                <colgroup>
                    <col width="82%" />
                    <col width="17%" />
                </colgroup>
                <tbody>
                    <tr class="odd">
                        <td>Union, intersection and <a href="http://docs.scala-lang.org/sips/pending/42.type.html">literal singleton types</a></td>
                        <td>Implemented</td>
                    </tr>
                    <tr class="even">
                        <td>Fast compilation (phase fusion)</td>
                        <td>Implemented</td>
                    </tr>
                    <tr class="odd">
                        <td><a href="http://docs.scala-lang.org/sips/pending/trait-parameters.html">Trait parameters</a></td>
                        <td>Implemented</td>
                    </tr>
                    <tr class="even">
                        <td><a href="https://github.com/scala/scala.github.com/pull/491">@@static methods and fields</a></td>
                        <td>Implemented</td>
                    </tr>
                    <tr class="odd">
                        <td>Improved REPL with colors</td>
                        <td>Implemented</td>
                    </tr>
                    <tr class="even">
                        <td>Sbt incremental build</td>
                        <td>Implemented</td>
                    </tr>
                    <tr class="odd">
                        <td>Non-blocking lazy vals</td>
                        <td>Implemented</td>
                    </tr>
                    <tr class="even">
                        <td>Option-less pattern matching (based on <a href="https://github.com/scala/scala/pull/2848">name-based patmat</a>)</td>
                        <td>Implemented</td>
                    </tr>
                    <tr class="odd">
                        <td>Function arity adaptation</td>
                        <td>Implemented</td>
                    </tr>
                    <tr class="even">
                        <td>Multiversal equality</td>
                        <td>Implemented</td>
                    </tr>
                    <tr class="odd">
                        <td>Exhaustivity checks in pattern matching</td>
                        <td>Implemented</td>
                    </tr>
                    <tr class="even">
                        <td>Non-boxed arrays of value classes</td>
                        <td>In progress</td>
                    </tr>
                    <tr class="odd">
                        <td>Working contravariant implicits</td>
                        <td>In progress</td>
                    </tr>
                    <tr class="even">
                        <td><a href="https://github.com/dotty-linker/dotty">Auto-Specialization</a></td>
                        <td>In progress</td>
                    </tr>
                    <tr class="odd">
                        <td><a href="https://github.com/dotty-linker/dotty">Whole program optimizer</a></td>
                        <td>In progress</td>
                    </tr>
                    <tr class="even">
                        <td>HList &amp; HMaps/Record types</td>
                        <td>In progress</td>
                    </tr>
                    <tr class="odd">
                        <td></td>
                        <td></td>
                    </tr>
                    <tr class="even">
                        <td>Implicit functions</td>
                        <td>Considered</td>
                    </tr>
                    <tr class="odd">
                        <td>Effects</td>
                        <td>Considered</td>
                    </tr>
                    <tr class="even">
                        <td>Auto-completion in repl</td>
                        <td>Considered</td>
                    </tr>
                    <tr class="odd">
                        <td>Spec Option-less pattern matching</td>
                        <td>Considered</td>
                    </tr>
                </tbody>
            </table>
        </div>
        <h1 id="talks-on-dotty">Talks on Dotty?</h1>
        <ul>
            <li><a href="https://www.youtube.com/watch?v=WxyyJyB_Ssc">Compilers are Databases</a> by Martin Odersky (<a href="http://www.slideshare.net/Odersky/compilers-are-databases">slides</a>)</li>
            <li><a href="https://www.youtube.com/watch?v=aftdOFuVU1o">Exploring the future of Scala</a> by Dmitry Petrashko (<a href="https://d-d.me/scalaworld2015/#/">slides</a>)</li>
        </ul>
        <h1 id="i-have-more-questions">I have more questions!</h1>
        <div class="centered-text">
            <p>That’s great! We have more details on the <a href="./docs">docs</a> and please join our <a href="https://gitter.im/lampepfl/dotty">Gitter channel</a>!</p>
        </div>
    </div>
</div>


    <div class="page white">
    <div class="centered" style="padding-top: 32px">
        <h1 id="getting-started">Getting Started</h1>
        <p>
            Using Dotty to compile your project is now pretty simple. Create the
            following structure:
        </p>
        <pre class="sourceCode bordered">
<code>.
├── build.sbt
├── project
│   ├── build.properties
│   └── plugins.sbt
└── src</code></pre>
        <h2 id="build.sbt">build.sbt</h2>
        <pre class="sourceCode bordered"><code>name := "application"
version := "0.1"
enablePlugins(DottyPlugin)</code></pre>
        <h2 id="build.properties">build.properties</h2>
        <pre class="sourceCode bordered"><code>sbt.version=0.13.11</code></pre>
        <h2 id="plugins.sbt">plugins.sbt</h2>
        <pre class="sourceCode bordered"><code>addSbtPlugin("com.felixmulder" % "sbt-dotty" % "0.1.7")</code></pre>
        <p>
            This plugin is based on the
            <a href="https://github.com/smarter/dotty-example-project">
                dotty-example-project
            </a>, but let’s you skip building dotty from scratch.
        </p>
    </div>
</div>


</div>

        <script
            src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"
            integrity="sha384-3ceskX3iaEnIogmQchP8opvBy3Mi7Ce34nWjpBIwVTHfGYWQS9jwHDVRnpKKHJg7"
            crossorigin="anonymous"
        ></script>
        <script
            src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.3.7/js/tether.min.js"
            integrity="sha384-XTs3FgkjiBgo8qjEjBk0tGmf3wPrWtA6coPfQDfFEY8AnYJwjalXCiosYRBIBZX8"
            crossorigin="anonymous"
        ></script>
        <script
            src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/js/bootstrap.min.js"
            integrity="sha384-BLiI7JTZm+JWlgKa0M0kGRpJbF2J8q+qreVrKBC47e3K6BW78kGLrCkeRX6I9RoK"
            crossorigin="anonymous"
        ></script>
        <script src="./js/highlight.pack.js"></script>
        
        <script src="./js/elasticlunr.min.js"></script>
        
        <script src="./js/search.js"></script>
        
        <script src="./js/scrollreveal.min.js"></script>
        
        <script src="./js/index.js"></script>
        
        <script>
            $(document).ready(function() {
                $('pre code').each(function(i, block) {
                    hljs.highlightBlock(block);
                });
            });
        </script>
    </body>
</html>