develooper Front page | perl.perl6.users | Postings from September 2018

Could this be any more obscure?

Thread Next
From:
Todd Chester
Date:
September 26, 2018 06:57
Subject:
Could this be any more obscure?
Message ID:
8bdc4b55-8e03-5ebd-4e0e-30f867e1c208@zoho.com
Hi All,

Over on
     https://docs.perl6.org/routine/words
I see

    multi method words(Str:D $input: $limit = Inf --> Positional)

HOW IN THE WORLD did they convert `$limit = Inf` into an
array index!?!?!

https://docs.perl6.org/type/Num#Inf
And `Inf` means a number larger than Perl can handle or Infinity.
What does that have to do with ANYTHING!?

Yours in confusion,
-T

And the worst part is that I know how to use "words" and use it
frequently.  And the documentation is a nightmare to understand.

Link to Positional:
https://docs.perl6.org/type/Positional
    Role for objects which support indexing them using
    postcircumfix:«[ ]» (usually list-like objects).
    Example types with Positional role include List,
    Array, Range, and Buf.

I like him using `Str:D $input:` rather than just `Str:D:`
and it is more intuitive

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About