OLD | NEW |
| (Empty) |
1 --- | |
2 layout: default | |
3 title: "A Tour of the Dart Language" | |
4 description: "Learn how to use each major Dart language feature." | |
5 has-permalinks: true | |
6 js: | |
7 - url: /js/lang-tour-analytics.js | |
8 defer: true | |
9 --- | |
10 | |
11 <h1> {{ page.title }} </h1> | |
12 | |
13 <section class="overview"> | |
14 <p> | |
15 Welcome to the Dart language tour! | |
16 We'll show you how to use each major Dart language feature, | |
17 from variables to operators to classes and libraries, | |
18 with the assumption that you already know how to program in another language. | |
19 </p> | |
20 | |
21 <aside> | |
22 <div class="alert alert-info"> | |
23 <strong>Tip:</strong> | |
24 Create a server application project in Dart Editor | |
25 so you can play with each feature. | |
26 See <a href="/docs/editor/getting-started/">Getting Started with Dart Editor
</a> | |
27 for instructions. | |
28 </div> | |
29 </aside> | |
30 | |
31 <p> | |
32 Consult the | |
33 <a href="/docs/spec/index.html">Dart Language Specification</a> | |
34 whenever you want more details about a language feature. | |
35 </p> | |
36 | |
37 <h4 id="toc"> Contents </h4> | |
38 <ol class="toc"> | |
39 <li> <a href="#main-print">A basic Dart program</a> </li> | |
40 <li> <a href="#variables">Variables</a> </li> | |
41 <li> <a href="#built-in-types">Built-in types</a> </li> | |
42 <li> <a href="#functions">Functions</a> </li> | |
43 <li> <a href="#operators">Operators</a> </li> | |
44 <li> <a href="#control-flow">Control flow</a> </li> | |
45 <li> <a href="#exceptions">Exceptions</a> </li> | |
46 <li> <a href="#classes">Classes</a> </li> | |
47 <li> <a href="#interfaces">Interfaces</a> </li> | |
48 <li> <a href="#generics">Generics</a> </li> | |
49 <li> <a href="#libraries">Libraries and visibility</a> </li> | |
50 <li> <a href="#isolates">Isolates</a> </li> | |
51 <li> <a href="#typedefs">Typedefs</a> </li> | |
52 <li> <a href="#comments">Comments</a> </li> | |
53 </ol> | |
54 | |
55 </section> | |
56 | |
57 | |
58 {% comment %} | |
59 NOTE: The guts of this page are in /_includes/language-tour/*/*. | |
60 {% endcomment %} | |
61 | |
62 | |
63 <section> | |
64 <h2 id="main-print"> A basic Dart program </h2> | |
65 {% render language-tour/1-main-print/index.markdown %} | |
66 <p class="up-to-toc"> | |
67 <a href="#toc">Back to contents.</a> | |
68 </p> | |
69 </section> | |
70 | |
71 <section> | |
72 <h2 id="variables"> Variables </h2> | |
73 {% render language-tour/2-variables/index.markdown %} | |
74 <p class="up-to-toc"> | |
75 <a href="#toc">Back to contents.</a> | |
76 </p> | |
77 </section> | |
78 | |
79 <section> | |
80 <h2 id="built-in-types"> Built-in types </h2> | |
81 {% include language-tour/3-built-in-types/index.html %} | |
82 <p class="up-to-toc"> | |
83 <a href="#toc">Back to contents.</a> | |
84 </p> | |
85 </section> | |
86 | |
87 <section> | |
88 <h2 id="functions"> Functions </h2> | |
89 {% render language-tour/functions/index.markdown %} | |
90 <p class="up-to-toc"> | |
91 <a href="#toc">Back to contents.</a> | |
92 </p> | |
93 </section> | |
94 | |
95 <section> | |
96 <h2 id="operators"> Operators </h2> | |
97 {% render language-tour/operators/index.markdown %} | |
98 <p class="up-to-toc"> | |
99 <a href="#toc">Back to contents.</a> | |
100 </p> | |
101 </section> | |
102 | |
103 <section> | |
104 <h2 id="control-flow"> Control flow </h2> | |
105 {% render language-tour/control-flow/index.markdown %} | |
106 <p class="up-to-toc"> | |
107 <a href="#toc">Back to contents.</a> | |
108 </p> | |
109 </section> | |
110 | |
111 <section> | |
112 <h2 id="exceptions">Exceptions</h2> | |
113 {% render language-tour/exceptions/index.markdown %} | |
114 <p class="up-to-toc"> | |
115 <a href="#toc">Back to contents.</a> | |
116 </p> | |
117 </section> | |
118 | |
119 <section> | |
120 <h2 id="classes">Classes</h2> | |
121 {% render language-tour/classes/index.markdown %} | |
122 <p class="up-to-toc"> | |
123 <a href="#toc">Back to contents.</a> | |
124 </p> | |
125 </section> | |
126 | |
127 <section> | |
128 <h2 id="interfaces">Interfaces</h2> | |
129 {% render language-tour/interfaces/index.markdown %} | |
130 <p class="up-to-toc"> | |
131 <a href="#toc">Back to contents.</a> | |
132 </p> | |
133 </section> | |
134 | |
135 <section> | |
136 <h2 id="generics">Generics</h2> | |
137 {% render language-tour/generics/index.markdown %} | |
138 <p class="up-to-toc"> | |
139 <a href="#toc">Back to contents.</a> | |
140 </p> | |
141 </section> | |
142 | |
143 <section> | |
144 <h2 id="libraries">Libraries and visibility</h2> | |
145 {% render language-tour/libraries/index.markdown %} | |
146 <p class="up-to-toc"> | |
147 <a href="#toc">Back to contents.</a> | |
148 </p> | |
149 </section> | |
150 | |
151 <section> | |
152 <h2 id="isolates">Isolates</h2> | |
153 | |
154 <p> | |
155 All code in Dart runs in the context of an isolate. | |
156 You can use additional isolates for concurrent programming, | |
157 and to run third-party code more securely. | |
158 </p> | |
159 | |
160 <p> | |
161 The isolates within an app don't share any state or memory. | |
162 Instead, isolates communicate by passing messages. | |
163 When an isolate sends a message, | |
164 the receiving isolate | |
165 gets a local copy of the original message's data. | |
166 </p> | |
167 | |
168 <p> | |
169 Learn more about | |
170 <a href="/docs/library-tour/#dartisolate---concurrency-with-isolates">isolat
es</a> in the library tour. | |
171 </p> | |
172 | |
173 <p class="up-to-toc"> | |
174 <a href="#toc">Back to contents.</a> | |
175 </p> | |
176 </section> | |
177 | |
178 <section> | |
179 <h2 id="typedefs">Typedefs</h2> | |
180 {% render language-tour/typedefs/index.markdown %} | |
181 <p class="up-to-toc"> | |
182 <a href="#toc">Back to contents.</a> | |
183 </p> | |
184 </section> | |
185 | |
186 <section> | |
187 <h2 id="comments">Comments</h2> | |
188 {% render language-tour/comments/index.markdown %} | |
189 <p class="up-to-toc"> | |
190 <a href="#toc">Back to contents.</a> | |
191 </p> | |
192 </section> | |
OLD | NEW |