On Fri, Jul 01, 2005 at 11:51:55AM -0700, Larry Wall wrote:
: So either we need a different sigil for type variables, or a syntax
: for explitly binding and declaring an autovivified type. (Which,
: interestingly, could also be used in rvalue context.)
I neglected to provide an example of this, but it'd be something like
$x = (my T) $y;
to declare that T is whatever type $y happens to be when evaluated.
It would have to be a special form, though, since it needs to expect
a term after it rather than an operator. And it would require the
absence of anything following T, since (my T $x) means something
entirely different, and in fact requires an operator to follow.
I don't see a better approach offhand, unless it's [my T], which
would have to be just a special, and risks visual confusion with
lists and reduction operators. So I'm still thinking (T)/(my T)
is the better approach. But it could use more collective mulling.
Larry