Hi All,

Not to beat a dead horse, but Perl 6's docs are
miserably hard to understand.

Here is a comparison of Perl 5's perldocs and Perl 6's
docs:

Perl 5:

$ perldoc -f index
    index STR,SUBSTR,POSITION
    index STR,SUBSTR
       The index function searches for one string within another,
       but without the wildcard-like behavior of a full regular-
       expression pattern match. It returns the position of
       the first occurrence of SUBSTR in STR at or after POSITION.
       If POSITION is omitted, starts searching from the beginning
       of the string. POSITION before the beginning of the string
       or after its end is treated as if it were the beginning
       or the end, respectively. POSITION and the return value
       are based at zero. If the substring is not found, "index"
       returns -1.

Perl 6:

    https://docs.perl6.org/routine/index

    Documentation for sub index assembled from the following types:
    class Cool

    From Cool
    (Cool) routine index

    Defined as:

multi sub index(Str(Cool) $s, Str:D $needle, Int(Cool) $startpos = 0 --> Int)
    multi method index(Str(Cool) $needle, Int(Cool) $startpos = 0 --> Int)

    Coerces the first two arguments (in method form, also counting
    the invocant) to Str, and searches for $needle in the string
    starting from $startpos. It returns the offset into the string
    where $needle was found, and an undefined value if it was not
    found.

    See the documentation in type Str for examples.


"Cources"??? Seriously:

    https://www.merriam-webster.com/dictionary/coerce
    Definition of coerce coerced; coercing
       transitive verb
       1 : to compel to an act or choice
           was coerced into agreeing
           abusers who coerce their victims into silence

       2 : to achieve by force or threat
           coerce compliance
           coerce obedience

       3 : to restrain or dominate by force

And what the heck is a "multi sub" and a "multi method" anyway?
AND WHY DO I EVEN CARE?  I just what to know how to use the
stinking thing!  Geepers Creapers !!!  (I am trying to avoid
swearing.)

Perl 5's perldoc just tells you what you need to know to use the
stinker.  It is concise and to the point.  Perl 6 is a nightmare
to understand.

Thank for putting up with my frustration.

-T

Reply via email to