$?CLASS 和 ::?CLASS 有什么区别

What's the difference between $?CLASS and ::?CLASS

Raku 文档 describe ::?CLASS as a compile-time variable that answers "Which class am I in?". Then, a couple of paragraphs later,它提到 $?CLASS,并说它回答“我在哪个 class?(作为变量)”。

这两个变量有什么区别?它们 经常 似乎包含相同的值——它们总是如此吗?还是有我没有观察到的差异?

compile-time variables 的这两种形式在句法上

句法形式 ::?foo 可以用作,并将计算为:

  • A term(就像$?foo这样的变量).

  • A type constraint不像一个变量,例如$?foo)。