Audrey Tang audreyt-at-audreyt.org |Perl 6| wrote:
Audrey Tang 提到:
However, in S02 you removed the Code class and replaced it with
Routine, but that does not really work; for example, a bare block is
a Code, but it cannot be a Routine since it can't be wrapped in
place, and caller() would bypass it when considering caller frames.
I should've been more explicit. While I don't really have a problem
with replacing Code with Callable (except the latter is more wordy, so
why not replace Callable with Code...),
1) nobody cared enough to discuss it for a couple weeks, and I decided
that's one reason why this is moving so slowly...better to =do=
already. See earlier post on Callable/Code.
2) Callable is mentioned in S02 as the role that goes with & variables,
and that is latest most official statement from Larry. Uses of Code for
that role (eqv to & variable) is relic from before roles. Why not use
Code instead of Callable? I think Larry wanted those key sigil roles to
have names that are adjectives. In any case, they form a nice matched set.
the issue is that your S02.pod edits indicates that a variable &foo
must always be bound to a Routine object. However, variable with the
"&" sigil can be bound to a Block as well, so replacing Code with
Routine at line 1487 and 1512 doesn't quite work. :-)
I must have made a mistake; that should have been Callable. Callable is
synonomous with the & sigil.
Cheers,
Audrey