Larry Wall wrote:
Jonathan Lang wrote:
: Two questions:
:
: 1. How would the capture sigil affect the use of capture objects as
: replacements for perl5's references?

I don't see how it would have any effect at all, unless the P5 ref happened
to be to a typeglob, or had both array and hash semantics tied to it.
The regular $$x, @$x, and %$x look much like they do in P5.

But $x is a scalar; wouldn't you need to use '|x' to denote a capture
object, thus making the above '$|x', '@|x', and '%|x', respectively?

we currently don't allow assignment to a capture, only binding.

IOW, if you want someone to be able to say '$|x' and get '$a' as a
result, you'd have to say '|x := \$a' (or perhaps '$|x := $a') instead
of '|x = \$a'.  Right?

--
Jonathan "Dataweaver" Lang

Reply via email to