@@ -523,7 +523,7 @@ the argument had not been supplied.
523
523
Assigning C<Nil> to any entire composite container (such as an
524
524
C<Array> or C<Hash>) empties the container, resetting it back to an
525
525
uninitialized state. The container object itself then becomes undefined.
526
- (Asssignment of C<()> leaves it defined.)
526
+ (Assignment of C<()> leaves it defined.)
527
527
528
528
=head2 Type Objects
529
529
@@ -570,7 +570,7 @@ where it makes sense to accept a wider set of types but coerce them
570
570
to a narrow type. (This only works for one-way coercion, so you
571
571
may not declare any C<rw> parameter with a coercive type.) The type
572
572
outside the parens indicates the desired end result, and subsequent
573
- code may depend on the it being that type. The type inside the parens
573
+ code may depend on it being that type. The type inside the parens
574
574
indicates the acceptable set of types that are allowed to be bound or
575
575
assigned to this location via coercion. If the wide type is omitted,
576
576
C<Any> is assumed. In any case, the wide type is only indicative of
@@ -624,9 +624,10 @@ C<rat>, C<buf>, C<bit>. Native types are primarily intended for
624
624
declaring compact array storage, that is, a sequence of storage locations of
625
625
the specified type laid out in memory contiguously without pointer indirection.
626
626
However, Perl will try to make those look like their corresponding uppercase
627
- types if you treat them that way. (In other words, it does autoboxing.
628
- Note, however, that sometimes repeated autoboxing can slow your program
629
- more than the native type can speed it up.)
627
+ types if you treat them that way. (In other words, it does autoboxing and
628
+ autounboxing as necessary. Note, however, that repeated autoboxing and unboxing
629
+ can make your program much slower, compared to a program that makes
630
+ consistent use of either native types or object types.)
630
631
631
632
=head3 The C<.WHICH> Method for Value Types
632
633
@@ -665,7 +666,7 @@ unless your process really is running under a NUMA.)
665
666
666
667
Alternately, if an object is being serialized to a form that does
667
668
not preserve object identity, there is no requirement to preserve
668
- uniqueness, since the object is in this case is really being translated
669
+ uniqueness, since in this case the object is really being translated
669
670
to a value type representation, and reconstituted on the other end
670
671
as a different unique object.
671
672
@@ -692,7 +693,7 @@ the appropriate type unless explicitly initialized to a defined value.
692
693
693
694
Any container's default may be overridden by the C<is default(VALUE)>
694
695
trait. If the container's contents are deleted, the value is
695
- notionally set to provided default value; this value may or may not
696
+ notionally set to the provided default value; this value may or may not
696
697
be physically represented in memory, depending on the implemention
697
698
of the container. You should officially not care about that (much).
698
699
@@ -786,8 +787,8 @@ the Big Bang with attosecond precision. Though perhaps not with
786
787
attosecond accuracy...)
787
788
788
789
The limitation on C<Rat> values is intended to be enforced only on
789
- user-visible types. Intermediate values used internally in calculation
790
- the values of C<Rat> operators may exceed this precision, or represent
790
+ user-visible types. Intermediate values used in the internal calculations
791
+ of C<Rat> operators may exceed this precision, or represent
791
792
negative denominators. That is, the temporaries used in calculating
792
793
the new numerator and denominator are (at least in the abstract) of
793
794
C<Int> type. After a new numerator and denominator are determined,
@@ -932,7 +933,7 @@ Implementation note: since Perl 6 mandates that the default Unicode
932
933
processing level must view graphemes as the fundamental unit rather
933
934
than codepoints, this has some implications regarding efficient
934
935
implementation. It is suggested that all graphemes be translated on
935
- input to a unique grapheme numbers and represented as integers within
936
+ input to unique grapheme numbers and represented as integers within
936
937
some kind of uniform array for fast substr access. For those graphemes
937
938
that have a precomposed form, use of that codepoint is suggested.
938
939
(Note that this means Latin-1 can still be represented internally
0 commit comments