I'm changing my mind about type sigils.  After playing around with ^
for a while, I find it's useful only in signatures and declarations,
and I'm generally forced to omit it when using it within inner
declarations, or it would redeclare the type.  Taking that together
with the fact that it installs a local :: symbol anyway, I think we
can safely go back to the position that the :: sigil in a signature
or declaration captures a parametric type, and otherwise is a no-op.

The problem that worried me (about wanting to refer to a type that
will exist but hasn't been declared yet) does not arise often in 
practice, and can be solved with a symbolic ref in any event, or
by predeclaring a stub type.

What tipped me over the edge, however, is that I want ^$x back for a
unary operator that is short for 0..^$x, that is, the range from 0
to $x - 1.  I kept wanting such an operator in revising S09.  It also
makes it easy to write

    for ^5 { say }  # 0, 1, 2, 3, 4

Now, while it's true that ^5 is an illegal type name, a unary operator
takes an expression, and that could start with an alpha: ^rand(5).
We could conceivably keep the type sigil if we forced you to say
instead ^(rand(5)) but that seems like a bad non-orthogonality.

So let's go back to ::T for a parametric type, at least until I change
my mind again.  Sorry if you feel jerked around.

Larry

Reply via email to