Replies: 2 comments 3 replies
-
I presume this compiles:
but I always wondered how the first my doesn't see a VARLIST of 2 elements. This certainly doesn't compile:
(ignore the main/CORE usage, they are only there as available classnames) |
Beta Was this translation helpful? Give feedback.
-
(Using the word type here cause that’s how perldocs refer to them) I’m comfortable with changing the type annotations the way you’ve suggested … this is effectively how it’s going to have to change to allow type annotations in signatures. If I think |
Beta Was this translation helpful? Give feedback.
-
From
perldoc -f my
:Currently, we can write code like this:
The
TYPE
cannot handle that. It assumes one type for all.If a
VAR
is defined asVAR
orTYPE VAR
, we can make this work:(Or using the attribute syntax, perhaps).
Paging @Perl-Oshun/core-team and @leonerd
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions