Skip to content

Commit da8984f

Browse files
authored
Update spec page (#1130)
1 parent b81381b commit da8984f

File tree

2 files changed

+24
-66
lines changed

2 files changed

+24
-66
lines changed

src/_guides/language/spec.md

+22-61
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,34 @@
11
---
2-
layout: default
3-
title: "Dart Language Specification"
4-
description: "The Dart language specification and proposed changes."
2+
title: Dart Language Specification
3+
description: The formal specification for the Dart language.
54
---
65

7-
Download the _Dart Programming Language Specification_ from
8-
the Ecma website:
6+
Use this page to find the formal Dart language specification.
7+
For a gentler introduction to Dart, see the
8+
[language tour](/guides/language/language-tour).
99

10-
* <a href="http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-408.pdf"
11-
target="_blank">Dart Programming Language Specification, 4<sup>th</sup> Edition</a>
12-
13-
For a gentler introduction to the Dart language, see the
14-
[Dart language tour](/guides/language/language-tour).
15-
16-
You can find previous editions of the specification at
17-
[Standard ECMA-408](http://www.ecma-international.org/publications/standards/Ecma-408-arch.htm).
18-
19-
20-
## Dart 2 changes
10+
## Dart 2
2111

2212
Dart 2 has changed the Dart language in many ways,
2313
some of which are not backward-compatible.
24-
For information about changes and implementation status,
25-
see the following resources:
26-
27-
* [Dart 2 Updates](/dart-2)
28-
* [Dart Language and Library Newsletters](https://github.com/dart-lang/sdk/tree/master/docs/newsletter#dart-language-and-library-newsletters)
29-
* [Language specification source file (TeX format)](https://github.com/dart-lang/sdk/blob/master/docs/language/dartLangSpec.tex)
30-
* [Informal specifications](https://github.com/dart-lang/sdk/tree/master/docs/language/informal)
31-
32-
33-
## Changes in the 4<sup>th</sup> edition
34-
35-
The 4<sup>th</sup> edition of the specification has fewer restrictions on mixins.
36-
The restrictions on mixins up until this edition were:
14+
For details, see the [Dart 2 page](/dart-2).
3715

38-
* Mixins must inherit directly from Object.
39-
* Mixins cannot contain super calls.
40-
* Mixins cannot define constructors.
16+
The formal language specification is not yet up-to-date.
17+
For information about Dart 2 changes, see the following resources.
4118

42-
Only the last one, mixins cannot define constructors, remains.
19+
* Feature specifications in the dart-lang/sdk repo:
20+
* [docs/language/informal](https://github.com/dart-lang/sdk/tree/master/docs/language/informal)
21+
* Feature specifications in the dart-lang/language repo:
22+
* [accepted](https://github.com/dart-lang/language/tree/master/accepted)
23+
* [working](https://github.com/dart-lang/language/tree/master/working)
24+
* Dart language specification work in progress:
25+
* [Source file (LaTeX format)](https://github.com/dart-lang/sdk/blob/master/docs/language/dartLangSpec.tex)
26+
* [Community-contributed PDF built from the source file](https://github.com/chalin/dart-spec-and-grammar/blob/master/doc/dartLangSpec.pdf)
4327

44-
## Changes in the 3<sup>rd</sup> edition
28+
## Dart 1.x
4529

46-
The 3<sup>rd</sup> edition of the specification added information
47-
about the following new language features:
30+
Download the formal language specification from the Ecma International
31+
website:
4832

49-
* Null-aware operators
50-
51-
* [Generalized tear offs](https://github.com/gbracha/generalizedTearOffs/blob/master/proposal.md)
52-
53-
{% comment %}
54-
Do we want to save this info on this page or delete it?
55-
56-
## Changes in the 2<sup>nd</sup> edition
57-
58-
The 2<sup>nd</sup> edition of the specification added information about
59-
the following new language features:
60-
61-
* Enumerations (`enum`)<br>
62-
Implemented in 1.8. For details, see the language tour:
63-
[Enumerated types](/guides/language/language-tour#enums).
64-
65-
* Asynchrony support (`async`, `await`, and more)<br>
66-
Partially implemented in 1.8.
67-
For details, see the language tour:
68-
[Asynchrony support](/guides/language/language-tour#asynchrony).
69-
70-
* Deferred loading (`import ... deferred as`)<br>
71-
Implemented in 1.6. For details, see the language tour:
72-
[Lazily loading a library](/guides/language/language-tour#deferred-loading).
73-
{% endcomment %}
33+
* <a href="http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-408.pdf"
34+
target="_blank" rel="noopener">Dart Programming Language Specification, 4<sup>th</sup> Edition</a>

src/dart-2.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ from either Dart 1.x or an earlier version of Dart 2.
5858

5959
1. **Get an up-to-date version of the Flutter or Dart SDK.**
6060
* [Flutter SDK instructions][Flutter SDK install]
61-
* [Dart SDK instructions][Dart SDK install] (VM or web)
61+
* [Dart SDK instructions][Dart SDK install] (server-side or web)
6262
2. **Upgrade the packages your app depends on.**
6363
* Flutter: [`flutter packages upgrade`][flutter package upgrade]
6464
* Server-side or web: [`pub upgrade`][pub upgrade]
@@ -81,8 +81,6 @@ from either Dart 1.x or an earlier version of Dart 2.
8181
`unnecessary_new` and `unnecessary_const` to the `linter` section of your
8282
[analysis options file][].
8383

84-
Each time the SDK has a significant release, repeat the process.
85-
8684
{% comment %}
8785
TODO:
8886
- talk about library vs. app migration?
@@ -144,7 +142,7 @@ environment:
144142
## More resources
145143

146144
* [DartPad](/tools/dartpad)
147-
* [Dart 2 changes][] section of the [Dart Language Specification][] page
145+
* [Dart Language Specification][]
148146
* [About Dart SDK release channels and version strings][pre-release]
149147
* [SDK constraints][]
150148
* [Updating your pub package to Dart 2,][]
@@ -167,7 +165,6 @@ environment:
167165
[build_runner web]: {{site.webdev}}/tools/build_runner
168166
[compile-time errors]: /guides/language/sound-problems#static-errors-and-warnings
169167
[creating library packages]: /guides/libraries/create-library-packages
170-
[Dart 2 changes]: /guides/language/spec#dart-2-changes
171168
[Dart 2 announcement]: https://medium.com/dartlang/announcing-dart-2-80ba01f43b6
172169
[Dart Language Specification]: /guides/language/spec
173170
[dart-lang/sdk CHANGELOG]: https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#200

0 commit comments

Comments
 (0)