Skip to content

Blog post on Scala 3 #872

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

Merged
merged 11 commits into from
Apr 20, 2018
Merged

Blog post on Scala 3 #872

merged 11 commits into from
Apr 20, 2018

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Apr 10, 2018

No description provided.

@odersky
Copy link
Contributor Author

odersky commented Apr 10, 2018

This one should go out before the macros blog. I propose tomorrow (Wednesday), with the macros blog following on Thursday.

@odersky
Copy link
Contributor Author

odersky commented Apr 11, 2018

The build failures look like this:

./_site/blog/2015/07/26/sip-slip-summary-july-2015.html

It looks like neither has to do with this blog post (or the other one)

@@ -0,0 +1,52 @@
---
layout: blog-page
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also a Jekyll build warning:

Build Warning: Layout 'blog-page' requested in blog/_posts/2018-04-11-scala-3.md does not exist.

You might need to check the front matter of you blog post is similar to other recent blog posts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! There were indeed some differences.

@odersky
Copy link
Contributor Author

odersky commented Apr 11, 2018

Now we get:

Who can help debug this?

@odersky
Copy link
Contributor Author

odersky commented Apr 11, 2018

We decided to wait a little bit longer and to consult more people before publishing.

@odersky
Copy link
Contributor Author

odersky commented Apr 18, 2018

Heather or Seth can you have a quick check to see whether we can merge this today? Adriaan has already seen it and LGTM'ed verbally.

@odersky
Copy link
Contributor Author

odersky commented Apr 18, 2018

We plan to publish a blog on macros early next week.

title: "Towards Scala 3"
---

Now that Scala 2.13 is around the corner, it's time to consider the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "around the corner" is not the right wording. There is still M4, then M5, then RC1. I would not consider 2.13 "around the corner" until RC1 is out. I think you might simply omit the whole sentence, and then in the "When will it come out?" section, insert "Scala 2.13 will come out later this year."

Of course, this statement invites many follow-up questions. Here are
some answers we can already give today. We expect there will be more
questions and answers as things shape up.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have repeatedly encountered a persistent misconception among new and/or occasional Scala users that Dotty is somehow a new language. I suggest leading with a "How different are Scala 2 and Scala 3?" section that emphasizes continuity. Perhaps beginning with something like "Scala 2 and Scala 3 are fundamentally the same language. The compiler is new, but nearly everything Scala programmers already know about Scala 2 applies to Scala 3 as well, and most ordinary Scala 2 code will also work on Scala 3 with only minor changes."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I have added that wording.

_What's new in Scala 3?_

Scala has pioneered the fusion of object-oriented and functional
programming in a typed setting. Scala 3 will be a big step towards
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for a general audience, better "statically typed" than just "typed", IMO. people coming from dynamic languages don't necessarily consider their languages not to be "typed".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer "typed". It's a matter to take back terminology to what it should mean.


_What about migration?_

Scala 3 is neither source nor binary compatible with Scala 2. However:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested wording: "As with previous Scala upgrades, Scala 3 is not binary compatible with Scala 2. They are mostly source compatible, but differences exist." simply saying "not source compatible" sounds more alarming than necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

Scala 3 is neither source nor binary compatible with Scala 2. However:


- Scala 3 code can link against Scala 2 artifacts (Scala 2.12 and upwards).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really unclear — you just said they aren't binary compatible, but now they kind of are? In fact, it sounds like Scala 3 and 2 are more binary compatible than e.g. 2.11 and 2.12 were?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if this feature is mentioned, it needs to be explained; what does it do, how does it work, how is it useful? (I personlly don't understand what it is).

- Scala 3 code can link against Scala 2 artifacts (Scala 2.12 and upwards).
- Scala 3 and Scala 2 share the same standard library.
- With some small tweaks it is possible to cross-build code for both Scala 2 and 3.
We will work on a guide defining the shared language subset that can be compiled under both versions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of "We will work on", suggest the more confident "We will provide"

and at the same time highlights necessary rewritings as migration warnings.
- The compiler can perform many of the rewritings automatically using a `-rewrite` option.
- Migration through automatic rewriting will also be offered through the `scalafix` tool,
which does not require Scala 3 to be installed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems peculiar and is perhaps an unnecessary level of detail. If I'm migrating to Scala 3 anyway, why do I care if this particular step doesn't require Scala 3 to be present?

Jetbrains has also released a first version of Dotty support in their Scala plugin,
and we hope to work with them on further improvements.
- REPL: A friendly REPL is supported by the compiler
- Docs: A revamped ScalaDoc tool generates docs for viewing in a browser and (in the future) also in the IDE..
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/ScalaDoc/Scaladoc/

- IDEs: IDE support is provided by having `dotc` implement LSP, the Language Server Protocol,
including standard operations such as completion and hyperlinking and more advanced ones
such as find references or rename. There’s a VS Code plugin incorporating these operations.
Jetbrains has also released a first version of Dotty support in their Scala plugin,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Jetbrains/JetBrains/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider writing "Scala 3" here instead of "Dotty"

including standard operations such as completion and hyperlinking and more advanced ones
such as find references or rename. There’s a VS Code plugin incorporating these operations.
Jetbrains has also released a first version of Dotty support in their Scala plugin,
and we hope to work with them on further improvements.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/hope/intend/

@SethTisue
Copy link
Member

Heather or Seth can you have a quick check to see whether we can merge this today

The only change I feel strongly about is that Scala 2.13 should not be described as "around the corner". The rest of my suggestions I think you could take or leave as you see fit.

@SethTisue
Copy link
Member

well, I guess I feel pretty strongly about the "lead with a "How different are Scala 2 and Scala 3?" section that emphasizes continuity" comment, too.


The intent is to publish the final Scala 3.0 soon after Scala 2.14. At the
current release schedule (which might still change), that means late
2019 or early 2020.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are no delays, we'll have 2.13 mid 2018, which means 2.14 early 2020, so "late 2019" is ambitious for 3.0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually I was wondering about that as well, I should have said something.

Scala 3 is neither source nor binary compatible with Scala 2. However:


- Scala 3 code can link against Scala 2 artifacts (Scala 2.12 and upwards).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if this feature is mentioned, it needs to be explained; what does it do, how does it work, how is it useful? (I personlly don't understand what it is).

@odersky
Copy link
Contributor Author

odersky commented Apr 19, 2018

Thanks for all the comments! I think Almost all suggestions are incorporated in the latest version.

@SethTisue
Copy link
Member

(CI failure is spurious (#875))

_What is Scala 2.14 for?_

Scala 2.14's main focus will be on smoothing the migration to Scala
3. It will do this by defining migration tools, shim libraries, and
Copy link
Member

@ashawley ashawley Apr 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown parsing in Jekyll is interpreting this as a bulleted list:

screen shot 2018-04-19 at 8 11 46 am

Viewing the Markdown file in Github does the right thing.

Github screen shot

Although viewing the diff in Github is highlighting the "3." in red.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

_How can I help?_

Scala 3 is developed completely in the open at
[https://github.com/lampepfl/dotty]. Get involved there, by fixing and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to make a URL a link in Markdown you need to use:

[https://github.com/lampepfl/dotty](https://github.com/lampepfl/dotty)


_When can I try it out?_

You can start working with Dotty now. See the getting started
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe link [getting started](http://dotty.epfl.ch/docs/contributing/getting-started.html)?

@odersky odersky merged commit c8fc261 into scala:master Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants