diff options
author | Adam Bard <github@adambard.com> | 2015-10-08 11:24:31 +0800 |
---|---|---|
committer | Adam Bard <github@adambard.com> | 2015-10-08 11:24:31 +0800 |
commit | abd7444f9e5343f597b561a69297122142881fc8 (patch) | |
tree | 1afa96957269a218ef2a84d9c9a2d4ab462e8fef /hack.html.markdown | |
parent | 5c677e8071291520297ef3d5d8374c6d11285744 (diff) | |
parent | 960ee4a1856db8eadb96277bb2422edfa8f2a81c (diff) |
Merge pull request #1395 from ghalley/spaces
[en] Remove unnecessary whitespace throughout the english files
Diffstat (limited to 'hack.html.markdown')
-rw-r--r-- | hack.html.markdown | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/hack.html.markdown b/hack.html.markdown index b9730dc0..b3d19f8e 100644 --- a/hack.html.markdown +++ b/hack.html.markdown @@ -51,7 +51,7 @@ function identity(?string $stringOrNull) : ?string class TypeHintedProperties { public ?string $name; - + protected int $id; private float $score = 100.0; @@ -91,7 +91,7 @@ function openBox(Box<int> $box) : int // Shapes -// +// // Hack adds the concept of shapes for defining struct-like arrays with a // guaranteed, type-checked set of keys type Point2D = shape('x' => int, 'y' => int); @@ -108,7 +108,7 @@ distance( // Type aliasing -// +// // Hack adds a bunch of type aliasing features for making complex types readable newtype VectorArray = array<int, Vector<int>>; @@ -142,7 +142,7 @@ function getRoadType() : RoadType // Constructor argument promotion -// +// // To avoid boilerplate property and constructor definitions that only set // properties, Hack adds a concise syntax for defining properties and a // constructor at the same time. @@ -171,12 +171,12 @@ class WithoutArgumentPromotion // Co-operative multi-tasking -// +// // Two new keywords "async" and "await" can be used to perform multi-tasking // Note that this does not involve threads - it just allows transfer of control async function cooperativePrint(int $start, int $end) : Awaitable<void> { - for ($i = $start; $i <= $end; $i++) { + for ($i = $start; $i <= $end; $i++) { echo "$i "; // Give other tasks a chance to do something @@ -193,9 +193,9 @@ AwaitAllWaitHandle::fromArray([ // Attributes -// +// // Attributes are a form of metadata for functions. Hack provides some -// special built-in attributes that introduce useful behaviour. +// special built-in attributes that introduce useful behaviour. // The __Memoize special attribute causes the result of a function to be cached <<__Memoize>> @@ -248,7 +248,7 @@ class ConsistentBar extends ConsistentFoo class InvalidFooSubclass extends ConsistentFoo { // Not matching the parent constructor will cause a type checker error: - // + // // "This object is of type ConsistentBaz. It is incompatible with this object // of type ConsistentFoo because some of their methods are incompatible" // @@ -259,7 +259,7 @@ class InvalidFooSubclass extends ConsistentFoo // Using the __Override annotation on a non-overriden method will cause a // type checker error: - // + // // "InvalidFooSubclass::otherMethod() is marked as override; no non-private // parent definition found or overridden parent is defined in non-<?hh code" // |