On 11/27/22 19:02, Clifton Wood wrote:
@ToddAndMargo: These are all explained in the Raku documentation.

For advanced users that already know what they are
doing and do not need it

Long story short:

"my \t" -- this is a RAW definition. You can use it to hold types, as in this case.
".of" is a methodĀ for Parametric Roles. It generally returns a type
"??" is the trinary operator. (expr) ?? <true return> !! <false return>

I did figure it out.  `\` is a special form
of "Sigil",

    noun
        A seal; a signet.
        A sign or an image considered magical.

which is a meaningless word until you realize it
is being co-opted by Raku:

    https://docs.raku.org/language/glossary#Sigil

    In Perl, the sigil is the first character of a
    variable name. It must be either $, @, %, or &
    respectively for a scalar, array, hash, or code
    variable [no mention of "\"]

What the special "\" sigil tells Raku is "I am not
telling you.  Figure it out on your own."  It is
a very *sneaky* what of getting around having to
declare your structure ($, @, %, &).  It is
very cleaver.

Oh and if you already know what you are doing
and know how to slice definitions real thin:

Sigilless variable
https://docs.raku.org/language/glossary#Sigilless_variable

     Sigilless variables are actually aliases to the
     value it is assigned to them, since they are
     not containers. Once you assign a sigilless
     variable (using the escape \), its value cannot
     be changed.

And if you did not already know that, you'd never have
found it because "\" is still a prefix to a variable
name and therefore is being used as special sigil
and should have been discussed in the sigil
documentation.  Again back to the documentation
being only for advanced users that do not need it.

If you are going to go further, please read the Raku documentation. These are basic questions that are covered there in detail.

The documentation is not beginner friendly.  I do
try to use it though.  I always go there first.

-T

The more I learn about Raku, the more astounded at
the thought that went into it.

Chuckle, my first search was for `\t`.  I was
frustrated on all the hist for "tabs".


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to