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

Unified Diff: pkg/dev_compiler/README.md

Issue 2923123003: Minor tweak on README (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/README.md
diff --git a/pkg/dev_compiler/README.md b/pkg/dev_compiler/README.md
index fd6a0d741b3a139f29c1f505f5de2fe274ef38ca..4f6e803814b389c3b2b83463291772c8641d58e5 100644
--- a/pkg/dev_compiler/README.md
+++ b/pkg/dev_compiler/README.md
@@ -48,7 +48,7 @@ There are some import caveats where Dart concepts do not map directly:
- *Libraries*. Multiple Dart libraries are mapped to a single JS module. Each library appears as a first class object in the generated JS module, with its top-level symbols as members. We currently use a heuristic (based upon file paths) to ensure unique naming of generated library objects.
- *Generics*. Dart generics are *reified*, i.e., they are preserved at runtime. Generic classes are mapped to factories that, given one or more type parameters, return an actual ES6 class (e.g., `HashMap$(core.String, core.int)` produces a class that represents a HashMap from strings to ints). Similarly, generic methods are mapped to factories that, given one or more type parameters, return a method.
- *Dynamic*. DDC supports dynamically typed code (i.e., Dart's `dynamic` type), but it will typically generate less readable and less efficient ES6 output as many type checks must be deferred to runtime. All dynamic operations are invoked via runtime helper code.
-- *Constructors*. Dart supports multiple, named constructors for a given class with a different initialization order for fields. In general, these are mapped to static methods on the generated ES6 class.
+- *Constructors*. Dart supports multiple, named and factory constructors for a given class with a different initialization order for fields. Today, these are mapped to instance or static methods on the generated ES6 class.
- *Private members*. Dart maps private members (e.g., private fields or methods) to ES6 symbols. For example, `a._x` may map to `a[_x]` where `_x` is a symbol only defined in the scope of the generated library.
- *Scoping*. Dart scoping rules and reserved words are slightly different than JavaScript. While we try to preserve names wherever possible, in certain cases, we are required to rename.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698