Skip to content

Commit

Permalink
Merge pull request #186 from awwaiid/curly-braces-consistency
Browse files Browse the repository at this point in the history
Find all the references to curly braces and make them consistent
  • Loading branch information
zoffixznet committed Nov 9, 2015
2 parents 820d1c7 + fb75c43 commit 00fc350
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions doc/Language/5to6-nutshell.pod
Expand Up @@ -359,7 +359,7 @@ I<Key/value-slicing>
say join ',', %calories<pear plum>:kv; # Perl 6 (prettier version)
=end item
Also note that the subscripting braces are now a normal postcircumfix
Also note that the subscripting curly braces are now a normal postcircumfix
operator rather than a special syntactic form, and thus L<checking for
existence of keys|#exists> and L<removing keys|#delete> is done with
adverbs.
Expand Down Expand Up @@ -411,7 +411,7 @@ In Perl 6, the curly braces are changed to parentheses.
say keys %($hashref );
say &($subref );
Note that in both Perl 5 and Perl 6, the surrounding braces or parens can
Note that in both Perl 5 and Perl 6, the surrounding curly braces or parens can
often be omitted, though the omission can reduce readability.
In Perl 5, the arrow operator, C«->» , is used for single access to a
Expand Down
8 changes: 4 additions & 4 deletions doc/Language/5to6-perlop.pod
Expand Up @@ -240,12 +240,12 @@ L<http://doc.perl6.org/language/quoting>.
There is a quoting operator that allows absolute literal strings: C<Q> or
C<「…」>, although the latter might be difficult to find on your keyboard,
depending on your keyboard... Backslash escapes do I<not> apply in C<Q> quoted
strings. E. g. C<Q{This is still a closing brace → \}> renders "This is still a
closing brace → \".
strings. E. g. C<Q{This is still a closing curly brace → \}> renders "This is still a
closing curly brace → \".
C<q> does what you expect, allowing backslash escapes. E. g. C<q{This is
not a closing brace → \}, but this is → }> returning "This is
not a closing brace → }, but this is →". As in Perl 5, you can
not a closing curly brace → \}, but this is → }> returning "This is
not a closing curly brace → }, but this is →". As in Perl 5, you can
get this behavior with single quotes.
C<qq> allows interpolation of variables. However, by default, only
Expand Down
2 changes: 1 addition & 1 deletion doc/Language/control.pod
Expand Up @@ -74,7 +74,7 @@ In other words, it follows the same reification rules as everything else.
Technically, C<do> is a loop which runs exactly one iteration.
A C<do> may also be used on a bare statement (without brackets)
A C<do> may also be used on a bare statement (without curly braces)
but this is mainly just useful for avoiding the syntactical need to
parenthesize a statement if it is the last thing in an expression:
Expand Down
2 changes: 1 addition & 1 deletion doc/Language/objects.pod
Expand Up @@ -556,7 +556,7 @@ instances and roles are meant for managing behavior and code reuse.
say $clone-of-p.x; # 1
=end code
Roles are immutable as soon as the compiler parses the closing bracket of
Roles are immutable as soon as the compiler parses the closing curly brace of
the role declaration.
=head2 Z<>Role Application
Expand Down
8 changes: 4 additions & 4 deletions doc/Language/quoting.pod
Expand Up @@ -25,15 +25,15 @@ possible.
=for code :allow<B>
Q<Make sure you B«<»matchB«>» opening and closing delimiters>
Q{This is still a closing brace → B<\>}
Q{This is still a closing curly brace → B<\>}
These examples produce:
A literal string
More plainly.
Almost any non-word character can be a delimiter!
Make sure you <match> opening and closing delimiters
This is still a closing brace → \
This is still a closing curly brace → \
The other quote forms add to this basic functionality:
Expand All @@ -43,7 +43,7 @@ The other quote forms add to this basic functionality:
B<'>Very plainB<'>
B<q[>This backB<\s>lash staysB<]>
B<q[>This backB<\\>slash staysB<]> # Identical output
B<q{>This is not a closing brace → B<\}>, but this is → B<}>
B<q{>This is not a closing culy brace → B<\}>, but this is → B<}>
B<Q :q $>There are no backslashes here, only lots of B<\$>B<\$>B<\$>!B<$>
B<'>(Just kidding. ThereB<\'>s no money in that string)B<'>
B<'>No $interpolation {here}!B<'>
Expand All @@ -60,7 +60,7 @@ These examples produce:
Very plain
This back\slash stays
This back\slash stays
This is not a closing brace → } but this is →
This is not a closing curly brace → } but this is →
There are no backslashes here, only lots of $$$!
(Just kidding. There's no money in that string)
No $interpolation {here}!
Expand Down
2 changes: 1 addition & 1 deletion doc/Language/subscripts.pod
Expand Up @@ -85,7 +85,7 @@ collection to be sure whether the keys are strings or objects:
my %h; %h{pi} = 1; say %h.perl; #-> { "3.14159265358979" => 1 }
While the invisible quotes around single names is built into C<=>>,
string conversion is not built into the braces: it is a behavior
string conversion is not built into the curly braces: it is a behavior
of the default C<Hash>. Not all types of hashes or collections
do so:
Expand Down
2 changes: 1 addition & 1 deletion doc/Language/syntax.pod
Expand Up @@ -62,7 +62,7 @@ A Perl 6 program is a list of statements, separated by semicolons C<;>.
A semicolon after the final statement (or after the final statement inside a
block) is optional, though it's good form to include it.
A closing curling brace followed by a newline character implies a statement
A closing curly brace followed by a newline character implies a statement
separator, which is why you don't need to write a semicolon before the last
line in the code
Expand Down
2 changes: 1 addition & 1 deletion doc/Type/Block.pod
Expand Up @@ -7,7 +7,7 @@
class Block is Code { }
A C<Block> is a code object meant for small-scale code reuse. A block is
created syntactically by a list of statements enclosed in curly brackets.
created syntactically by a list of statements enclosed in curly braces.
Without an explicit signature or placeholder arguments, a block has C<$_>
as a positional argument
Expand Down

0 comments on commit 00fc350

Please sign in to comment.