top | item 45988357

(no title)

kwoff | 3 months ago

  - weird sigil rules where the 0 element of @x is $x[0] not @x[0]
'@' and '%' indicate containers, while '$' is a scalar (which containers can contain). So '$x[0]' is referring to a scalar within the '@x' container. If you operate on a container, like 'push @x, 2', it uses the container sigil.

I guess "weird" triggered me a bit, heh. I know it's subjective.

discuss

order

cowboylowrez|3 months ago

haha even your explanation looks 'write only'

lupire|3 months ago

Sigils are essentially type tags. That's it.

Array x === @x

Int x[0] === $x[0]