-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Blog Post: Announcing Dotty 0.6.0 and 0.7.0-RC1 #4053
Changes from 1 commit
7bb287c
bf77e84
86f24d2
bbdd2af
3bd057f
dde9330
ffbedef
dc81fd3
a5dcce7
ccb1dae
a18f371
ae8e102
2fdb46d
5c4fac2
88e97bd
5d9440a
6006650
cf9db16
8e29d89
61e7829
b636b84
0226693
5dcf789
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
--- | ||
layout: blog-page | ||
title: Announcing Dotty 0.6.0 and 0.7.0-RC1 | ||
author: Allan Renucci | ||
authorImg: /images/allan.jpg | ||
date: 2018-03-05 | ||
--- | ||
|
||
Today, we are excited to release Dotty versions 0.6.0 and 0.7.0-RC1. These releases | ||
serve as a technology preview that demonstrates new language features and the compiler supporting them. | ||
|
||
If you’re not familiar with Dotty, it's 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 | ||
constructs. The theory behind these constructs is researched in | ||
[DOT](https://infoscience.epfl.ch/record/215280), a calculus for dependent object types. | ||
You can learn more about Dotty on our [website](http://dotty.epfl.ch). | ||
|
||
<!--more--> | ||
|
||
This is our seventh scheduled release according to our [6-week release schedule](/docs/usage/version-numbers.html). | ||
The [previous technology preview](https://github.com/lampepfl/dotty/releases/tag/0.6.0-RC1) focussed | ||
on bug fixes and stability work. | ||
|
||
## What’s new in the 0.7.0-RC1 technology preview? | ||
|
||
### Enums Simplicification [#4003](https://github.com/lampepfl/dotty/pull/4003) | ||
The previously introduced syntax and rules for enum were arguably too complex. We can considerably | ||
simplify them by taking away one capability: that cases can have bodies which can define members. | ||
Arguably, if we choose an ADT decomposition of a problem, it's good style to write all methods using | ||
pattern matching instead of overriding individual cases. So this removes an unnecessary choice. | ||
We now treat enums unequivocally as classes. They can have methods and other statements just like | ||
other classes can. Cases in enums are seen as a form of constructors. We do not need a | ||
distinction between enum class and enum object anymore. Enums can have companion objects just like | ||
normal classes can, of course. | ||
|
||
Let's consider how `Option` can be represented as an enum. Previously using an enum class: | ||
```scala | ||
enum class Option[+T] { | ||
def isDefined: Boolean | ||
} | ||
object Option { | ||
case Some[+T](x: T) { | ||
def isDefined = true | ||
} | ||
case None { | ||
def isDefined = false | ||
} | ||
|
||
def apply[T(x: T): Option[T] = if (x == null) None else Some(x) | ||
} | ||
``` | ||
|
||
And now: | ||
```scala | ||
enum Option[+T] { | ||
case Some(x: T) | ||
case None | ||
|
||
def isDefined: Boolean = this match { | ||
case None => false | ||
case some => true | ||
} | ||
} | ||
|
||
object Option { | ||
def apply[T](x: T): Option[T] = if (x == null) None else Some(x) | ||
} | ||
``` | ||
|
||
You can visit our website for more information about [enumerations](/docs/reference/enums/enums.html) | ||
and how we can use them to model [Algebraic Data Types](/docs/reference/enums/adts.html). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these links up-date? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These links will become valid once the page is generated. An alternative would be to write absolute links (e.g. http://dotty.epfl.ch/docs/reference/enums/enums.html) so that they are also valid links in GitHub There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry: I was asking if the docs in the target pages have been updated (and I thought not). |
||
|
||
### Unused Parameters [#3342](https://github.com/lampepfl/dotty/pull/3342) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nicolasstucki Do you want to do this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nicolasstucki Probably we should say a couple words about going from phantom types to unused parameters (#2040 (comment)), probably in the release notes rather than in the docs for the latest release (to avoid confusing new users). Starting point:
|
||
TODO | ||
|
||
## Trying out Dotty | ||
### Scastie | ||
[Scastie], the online Scala playground, supports Dotty. | ||
This is an easy way to try Dotty without installing anything. | ||
|
||
### sbt | ||
Using sbt 0.13.13 or newer, do: | ||
|
||
```shell | ||
sbt new lampepfl/dotty.g8 | ||
``` | ||
|
||
This will setup a new sbt project with Dotty as compiler. For more details on | ||
using Dotty with sbt, see the | ||
[example project](https://github.com/lampepfl/dotty-example-project). | ||
|
||
### IDE support | ||
It is very easy to start using the Dotty IDE in any Dotty project by following | ||
the [IDE guide](http://dotty.epfl.ch/docs/usage/ide-support.html). | ||
|
||
|
||
### Standalone installation | ||
Releases are available for download on the _Releases_ | ||
section of the Dotty repository: | ||
[https://github.com/lampepfl/dotty/releases](https://github.com/lampepfl/dotty/releases) | ||
|
||
We also provide a [homebrew](https://brew.sh/) package that can be installed by running: | ||
|
||
```shell | ||
brew install lampepfl/brew/dotty | ||
``` | ||
|
||
In case you have already installed Dotty via brew, you should instead update it: | ||
|
||
```shell | ||
brew upgrade dotty | ||
``` | ||
|
||
## Let us know what you think! | ||
If you have questions or any sort of feedback, feel free to send us a message on our | ||
[Gitter channel](https://gitter.im/lampepfl/dotty). If you encounter a bug, please | ||
[open an issue on GitHub](https://github.com/lampepfl/dotty/issues/new). | ||
|
||
## Contributing | ||
Thank you to all the contributors who made this release possible! | ||
|
||
According to `git shortlog -sn --no-merges 0.6.0-RC1..0.7.0-RC1` these are: | ||
|
||
``` | ||
TODO | ||
``` | ||
|
||
If you want to get your hands dirty and contribute to Dotty, now is a good time to get involved! | ||
Head to our [Getting Started page for new contributors](http://dotty.epfl.ch/docs/contributing/getting-started.html), | ||
and have a look at some of the [good first issues](https://github.com/lampepfl/dotty/issues?q=is%3Aissue+is%3Aopen+label%3Aexp%3Anovice). | ||
They make perfect entry-points into hacking on the compiler. | ||
|
||
We are looking forward to having you join the team of contributors. | ||
|
||
## Library authors: Join our community build | ||
Dotty now has a set of widely-used community libraries that are built against every nightly Dotty | ||
snapshot. Currently this includes ScalaPB, algebra, scalatest, scopt and squants. | ||
Join our [community build](https://github.com/lampepfl/dotty-community-build) | ||
to make sure that our regression suite includes your library. | ||
|
||
|
||
[Scastie]: https://scastie.scala-lang.org/?target=dotty | ||
|
||
[@odersky]: https://github.com/odersky | ||
[@DarkDimius]: https://github.com/DarkDimius | ||
[@smarter]: https://github.com/smarter | ||
[@felixmulder]: https://github.com/felixmulder | ||
[@nicolasstucki]: https://github.com/nicolasstucki | ||
[@liufengyun]: https://github.com/liufengyun | ||
[@OlivierBlanvillain]: https://github.com/OlivierBlanvillain | ||
[@biboudis]: https://github.com/biboudis | ||
[@allanrenucci]: https://github.com/allanrenucci | ||
[@Blaisorblade]: https://github.com/Blaisorblade | ||
[@Blaisorblade]: https://github.com/Blaisorblade | ||
[@Duhemm]: https://github.com/duhemm | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo:
Simplification