Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(646)

Unified Diff: ch00.xml

Issue 103483002: add back dart:mirrors content, remove dart:isolate, misc. tweaks/updates (Closed) Base URL: https://github.com/dart-lang/dart-up-and-running-book.git@master
Patch Set: move a misplaced comment Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bookinfo.xml ('k') | ch01.xml » ('j') | ch03.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ch00.xml
diff --git a/ch00.xml b/ch00.xml
index 3845244c0a7a1d728ef6b67bbe81697b7bd1cd2f..ee46ffff4bf9359139095fa199628a15d152526e 100644
--- a/ch00.xml
+++ b/ch00.xml
@@ -204,77 +204,61 @@
<sect2 id="preface-updates-v3">
<title>Changes After the Second Printing</title>
- <para>We’ve updated the content to reflect the following M4
+ <para>We've changed the text and examples to reflect these language
changes:</para>
<itemizedlist>
<listitem>
- <para>File’s <literal>openWrite()</literal> method now has no
- required parameters but two optional named parameters. The
- <literal>mode</literal> parameter has a default value of
- <literal>FileMode.WRITE</literal>.</para>
+ <para>Instance variables can no longer be <literal>const</literal>.
+ Use <literal>static const</literal> variables instead.</para>
sethladd 2013/12/04 19:06:01 you said instance variables, but you mention stati
</listitem>
<listitem>
- <para>File’s <literal>readAsString()</literal> and
- <literal>readAsLines()</literal> methods no longer require a
- parameter. Instead, they have an optional named parameter
- (<literal>encoding</literal>), with a default value of
- <literal>Encoding.UTF_8</literal>.</para>
+ <para>The <literal>?</literal> operator for testing whether an
+ optional parameter has been set is no longer in the language.</para>
</listitem>
<listitem>
- <para>IOSink’s methods for writing data have changed. To write
- string data, instead of <literal>addString()</literal> use
- <literal>write()</literal>. The method for writing binary data was
- temporarily renamed to <literal>writeBytes()</literal>, but is now
- back to <literal>add()</literal>.</para>
+ <para>Keys in map literals no longer need to be strings.</para>
</listitem>
<listitem>
- <para>Set’s <literal>isSubsetOf()</literal> method is gone. Instead,
- use the Set <literal>containsAll()</literal> method. You can convert
- any Iterable to a Set using <literal>toSet()</literal>.</para>
+ <para>Dart now has Symbols and symbol literals
+ (<literal>#<replaceable>identifier</replaceable></literal>): <xref
+ linkend="ch02-symbols" />.</para>
</listitem>
<listitem>
- <para>The Collection class is gone, so we’ve changed the way we
- talked about sets, lists, and maps in <xref
- linkend="ch03-collections" />, and we talk more about
- Iterable.</para>
+ <para>Function equality testing is easier: <xref
+ linkend="ch02-function-equality" />.</para>
</listitem>
<listitem>
- <para>The AsyncError class has been removed.</para>
+ <para>Bitwise operators have higher precedence than they used
+ to.</para>
</listitem>
</itemizedlist>
- <para>M5 introduced additional changes:</para>
+ <para>We've also updated the content to reflect API changes. In
+ dart:core:</para>
<itemizedlist>
<listitem>
- <para>The dart_analyzer tool has been replaced by
- dartanalyzer.</para>
- </listitem>
-
- <listitem>
- <para>Instance variables can no longer be <literal>const</literal>.
- Use <literal>static const</literal> variables instead.</para>
- </listitem>
-
- <listitem>
- <para>The <literal>?</literal> operator for testing whether an
- optional parameter has been set is no longer in the language.</para>
+ <para>Set’s <literal>isSubsetOf()</literal> method is gone. Instead,
+ use the Set <literal>containsAll()</literal> method. You can convert
+ any Iterable to a Set using <literal>toSet()</literal>.</para>
</listitem>
<listitem>
- <para>The dart:crypto library has moved out of the SDK (to <ulink
- url="http://pub.dartlang.org/packages/crypto">http://pub.dartlang.org/packages/crypto</ulink>).</para>
+ <para>The Collection class is gone, so we’ve changed the way we
+ talked about sets, lists, and maps in <xref
+ linkend="ch03-collections" />, and we talk more about
+ Iterable.</para>
</listitem>
<listitem>
- <para>The dart:uri library is gone, its functionality folded into a
- new Uri class in dart:core. The top-level functions
+ <para>The functionality in the former dart:uri library is now in the
+ Uri class in dart:core. The top-level functions
<literal>encodeUri()</literal>,
<literal>encodeUriComponent()</literal>,
<literal>decodeUri()</literal>, and
@@ -289,41 +273,92 @@
Finally, the <literal>domain</literal> field is now named
<literal>host</literal>.</para>
</listitem>
+
+ <listitem>
+ <para>The @deprecated, @override, and @proxy annotations moved from
+ the meta package to dart:core.</para>
+ </listitem>
</itemizedlist>
+ <para>In dart:io:</para>
+
<itemizedlist>
<listitem>
- <para>The dartdoc <literal>--pkg</literal> command-line option is
- now <literal>--package-root</literal>.</para>
+ <para>File’s <literal>openWrite()</literal> method now has no
+ required parameters but two optional named parameters. The
+ <literal>mode</literal> parameter has a default value of
+ <literal>FileMode.WRITE</literal>.</para>
+ </listitem>
+
+ <listitem>
+ <para>File’s <literal>readAsString()</literal> and
+ <literal>readAsLines()</literal> methods no longer require a
+ parameter. Instead, they have an optional named parameter
+ (<literal>encoding</literal>), with a default value of
+ <literal>Encoding.UTF_8</literal>.</para>
+ </listitem>
+
+ <listitem>
+ <para>IOSink’s methods for writing data have changed. To write
+ string data, instead of <literal>addString()</literal> use
+ <literal>write()</literal>. The method for writing binary data was
+ temporarily renamed to <literal>writeBytes()</literal>, but reverted
+ back to <literal>add()</literal>.</para>
</listitem>
</itemizedlist>
- <para>M6, M7, and M8 introduced additional changes:</para>
+ <para>A new dart:convert library replaces dart:json and dart:uri:</para>
<itemizedlist>
<listitem>
- <para>Keys in map literals no longer need to be strings.</para>
+ <para>Instead of a StringDecoder, use
+ <literal>UTF8.decoder</literal> to convert UTF-8 characters into a
+ Dart string.</para>
</listitem>
<listitem>
- <para>Dart now has Symbols and symbol literals
- (<literal>#<replaceable>identifier</replaceable></literal>): <xref
- linkend="ch02-symbols" />.</para>
+ <para>Instead of a LineTransformer, use a LineSplitter object to
+ split a stream of strings into a stream of individual lines.</para>
</listitem>
<listitem>
- <para>Function equality testing is easier: <xref
- linkend="ch02-function-equality" />.</para>
+ <para>Where you used to use dart:json's top-level
+ <literal>parse()</literal> and <literal>stringify()</literal>
+ functions, use <literal>JSON.decode()</literal> and
+ <literal>JSON.encode()</literal>, respectively.</para>
</listitem>
<listitem>
- <para>Bitwise operators have higher precedence than they used
- to.</para>
+ <para>Where you used to use dart:uri's top-level
+ <literal>decodeUri()</literal> and <literal>encodeUri()</literal>
+ functions, use <literal>UTF8.decode()</literal> and
+ <literal>UTF8.encode()</literal>, respectively.</para>
</listitem>
+ </itemizedlist>
+
+ <para>Other API changes include:</para>
+ <itemizedlist>
<listitem>
- <para>The @deprecated, @override, and @proxy annotations moved from
- the meta package to dart:core.</para>
+ <para>In dart:html, the <literal>query()</literal> and
+ <literal>queryAll()</literal> methods changed to
+ <literal>querySelector()</literal> and
+ <literal>querySelectorAll()</literal>, respectively.</para>
+ </listitem>
+
+ <listitem>
+ <para>The dart:crypto library moved out of the SDK (to <ulink
+ url="http://pub.dartlang.org/packages/crypto">http://pub.dartlang.org/packages/crypto</ulink>).</para>
+ </listitem>
+
+ <listitem>
+ <para>The AsyncError class was removed (from dart:async).</para>
+ </listitem>
+
+ <listitem>
+ <para>The dart:isolate library was refactored to have only core
+ primitives. We removed its coverage from the book but expect higher
+ level APIs to come along that make using isolates easier.</para>
</listitem>
<listitem>
@@ -332,35 +367,47 @@
</listitem>
</itemizedlist>
- <para>We also added new coverage of previously undocumented features and
- tweaked existing coverage:</para>
+ <para>The sections that talk about tools have changed, too:</para>
<itemizedlist>
<listitem>
- <para>Added <xref linkend="ch02-mixins" />.</para>
+ <para>The dart_analyzer tool has been replaced by
+ dartanalyzer.</para>
</listitem>
<listitem>
- <para>Added <xref linkend="ch03-mirrors" />.</para>
+ <para>Command-line arguments for many tools have changed. For
+ example, the dartdoc <literal>--pkg</literal> command-line option
+ changed to <literal>--package-root</literal>.</para>
</listitem>
<listitem>
- <para>In <xref linkend="ch02-keywords" />, marked which keywords are
- built-in identifiers and discussed how they differ from reserved
- words.</para>
+ <para>The pub tool now has build and serve commands, which work with
+ transformers to convert your source files into their final
+ format.</para>
</listitem>
<listitem>
- <para>Added coverage of the + operator for strings.</para>
+ <para>We fleshed out the dart2js docs.</para>
</listitem>
+ </itemizedlist>
+
+ <para>We also added new coverage of previously undocumented features and
+ tweaked existing coverage. In the language tour:</para>
+ <itemizedlist>
<listitem>
- <para>Fleshed out dart2js docs.</para>
+ <para>Added <xref linkend="ch02-mixins" />.</para>
</listitem>
<listitem>
- <para>Removed the incorrect <literal>new</literal> from the example
- of using Future.wait().</para>
+ <para>In <xref linkend="ch02-keywords" />, marked which keywords are
+ built-in identifiers and discussed how they differ from reserved
+ words.</para>
+ </listitem>
+
+ <listitem>
+ <para>Added coverage of the + operator for strings.</para>
</listitem>
<listitem>
@@ -380,6 +427,34 @@
for Dart Doc Comments.</ulink></para>
</listitem>
</itemizedlist>
+
+ <para>In the library tour:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Added <xref linkend="ch03-mirrors" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>Added examples of parsing non-decimal numbers.</para>
+ </listitem>
+
+ <listitem>
+ <para>Removed the incorrect <literal>new</literal> from the example
+ of using Future.wait().</para>
+ </listitem>
+
+ <listitem>
+ <para>Removed coverage of Completer, which is no longer
+ recommended.</para>
+ </listitem>
+
+ <listitem>
+ <para>Added <xref linkend="ch03-streams" />.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Throughout the book, we updated links to related topics.</para>
</sect2>
<sect2 id="preface-updates-v2">
« no previous file with comments | « bookinfo.xml ('k') | ch01.xml » ('j') | ch03.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698