Skip to content

Commit c251a84

Browse files
committed
Some cleanups from hexcoder++
1 parent 75b2e71 commit c251a84

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

S02-bits.pod

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ the argument had not been supplied.
523523
Assigning C<Nil> to any entire composite container (such as an
524524
C<Array> or C<Hash>) empties the container, resetting it back to an
525525
uninitialized state. The container object itself then becomes undefined.
526-
(Asssignment of C<()> leaves it defined.)
526+
(Assignment of C<()> leaves it defined.)
527527

528528
=head2 Type Objects
529529

@@ -570,7 +570,7 @@ where it makes sense to accept a wider set of types but coerce them
570570
to a narrow type. (This only works for one-way coercion, so you
571571
may not declare any C<rw> parameter with a coercive type.) The type
572572
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
574574
indicates the acceptable set of types that are allowed to be bound or
575575
assigned to this location via coercion. If the wide type is omitted,
576576
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
624624
declaring compact array storage, that is, a sequence of storage locations of
625625
the specified type laid out in memory contiguously without pointer indirection.
626626
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.)
630631

631632
=head3 The C<.WHICH> Method for Value Types
632633

@@ -665,7 +666,7 @@ unless your process really is running under a NUMA.)
665666

666667
Alternately, if an object is being serialized to a form that does
667668
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
669670
to a value type representation, and reconstituted on the other end
670671
as a different unique object.
671672

@@ -692,7 +693,7 @@ the appropriate type unless explicitly initialized to a defined value.
692693

693694
Any container's default may be overridden by the C<is default(VALUE)>
694695
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
696697
be physically represented in memory, depending on the implemention
697698
of the container. You should officially not care about that (much).
698699

@@ -786,8 +787,8 @@ the Big Bang with attosecond precision. Though perhaps not with
786787
attosecond accuracy...)
787788

788789
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
791792
negative denominators. That is, the temporaries used in calculating
792793
the new numerator and denominator are (at least in the abstract) of
793794
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
932933
processing level must view graphemes as the fundamental unit rather
933934
than codepoints, this has some implications regarding efficient
934935
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
936937
some kind of uniform array for fast substr access. For those graphemes
937938
that have a precomposed form, use of that codepoint is suggested.
938939
(Note that this means Latin-1 can still be represented internally

0 commit comments

Comments
 (0)