Skip to content

Commit

Permalink
incorporate fixes from Pm; answer Pm's questions
Browse files Browse the repository at this point in the history
  • Loading branch information
perlpilot committed Jul 27, 2010
1 parent f7dc274 commit b0708ef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
9 changes: 9 additions & 0 deletions docs/review-notes.txt
Expand Up @@ -2,15 +2,24 @@ Pm-1: (basics) The first example uses C<.split> (e.g. to get the list
of names), but in Perl 6 the canonical way to grab a list
of words is via C<.comb>. Should we switch?

perlpilot: I don't think so. C<.comb> takes a regex to describe
what you want and it's too soon and potentially
confusing to bring those up.

Pm-2: (basics) Footnote 1 -- I'd reword as "Unlike in Perl 5, in Perl 6
the sigil does not change when accessing an array or hash
using C<[ ]> or C<{ }>. This is called I<sigil invariance>."

perlpilot: reworded mostly the same.

Pm-3: (basics) I know it's a bit early to talk about Junctions, but
for the answer to problem #2 it might be better to say

unless all($p1, $p2) ~~ @names { ... }

perlpilot: Definitely not. We don't talk about Junctions B<at all> in
the book yet :)

Pm-4: (operators) The &infix:<,> operator doesn't construct a C<List>,
and C<List>s are no longer immutable.

Expand Down
15 changes: 7 additions & 8 deletions src/basics.pod
Expand Up @@ -160,14 +160,13 @@ an C<Array>. Arrays store ordered lists.

X<hash>

These two lines of code declare two hashes. The C<%> sigil marks each variable
as a C<Hash>. A C<Hash> is an unordered
collection of pairs of keys and values. Other programming languages call that a
I<hash table>, I<dictionary>, or I<map>. You can query a hash table for the
value that corresponds to a certain C<$key> with C<%hash{$key}>N<
Perl 5 programmers will notice that in Perl 6 the sigil stays the same
and does not change upon indexing with C<[ ]> or C<{ }>. This
is referred to as I<M<sigil invariance>>.>.
These two lines of code declare two hashes. The c<%> sigil marks each
variable as a C<Hash>. A C<Hash> is an unordered collection of pairs of
keys and values. Other programming languages call that a I<hash table>,
I<dictionary>, or I<map>. You can query a hash table for the value that
corresponds to a certain C<$key> with C<%hash{$key}>N<Unlike Perl 5, in
Perl 6 the sigil does not change when accessing an array or hash with
C<[ ]> or C<{ }>. This is called I<M<sigil invariance>>.>.

In the score counting program, C<%matches> stores the number of matches each
player has won. C<%sets> stores the number of sets each player has won.
Expand Down

0 comments on commit b0708ef

Please sign in to comment.