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

Unified Diff: src/site/articles/idiomatic-dart/index.html

Issue 10788006: new site (Closed) Base URL: https://code.google.com/p/dartlang-site/@master
Patch Set: final patch Created 8 years, 5 months 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 | « src/site/articles/emulating-functions/index.html ('k') | src/site/articles/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/site/articles/idiomatic-dart/index.html
diff --git a/src/site/articles/idiomatic-dart/index.html b/src/site/articles/idiomatic-dart/index.html
index 446884f59a5d38bf3a9d5c45e0521d648c91bb1d..9978c3305ac64fcd21d97b52baa6432c53ada6dc 100644
--- a/src/site/articles/idiomatic-dart/index.html
+++ b/src/site/articles/idiomatic-dart/index.html
@@ -258,7 +258,7 @@ num abs(num value) => value < 0 ? -value : value;
final TWO_PI = Math.PI * 2.0;
int get today() {
- final date = new DateTime.now();
+ final date = new Date.now();
return date.day;
}
{% endhighlight dart 0 %}
@@ -288,15 +288,7 @@ I
"""
{% endhighlight dart 0 %}
-<p>To build bigger strings from these pieces, you <em>can</em> just concatenate them using <code>+</code>:
-
-{% highlight dart %}
-var name = 'Fred';
-var salutation = 'Hi';
-var greeting = salutation + ', ' + name;
-{% endhighlight dart 0 %}
-
-<p>But it's cleaner and faster to use <em>string interpolation</em>:</p>
+<p>There is no plus (+) operator on String. It's cleaner and faster to use <em>string interpolation</em>:</p>
{% highlight dart %}
var name = 'Fred';
@@ -304,7 +296,10 @@ var salutation = 'Hi';
var greeting = '$salutation, $name';
{% endhighlight dart 0 %}
-<p>A dollar sign (<code>$</code>) in a string literal followed by a variable will expand to that variable's value. (If the variable isn't a string, it calls <code>toString()</code> on it.) You can also interpolate expressions by placing them inside curly braces:</p>
+<p>A dollar sign (<code>$</code>) in a string literal followed by a variable
+ will expand to that variable's value. (If the variable isn't a string,
+ it calls <code>toString()</code> on it.) You can also interpolate expressions by
+ placing them inside curly braces:</p>
{% highlight dart %}
var r = 2;
« no previous file with comments | « src/site/articles/emulating-functions/index.html ('k') | src/site/articles/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698