I don't care for the use of * there, but it would be nice to have some way to declare the variable to have the type implied by its initializer, where the complier can tell what that is, so you could remove the redundancy in this:
my Dog $fido = new Dog(); while still allowing the var declared via my $fifi = new Dog(); Oo be untyped. On 4/14/08, David Green <[EMAIL PROTECTED]> wrote: > On 2008-Apr-13, at 4:07 am, John M. Dlugosz wrote: > > I'm thinking that 'constant' is more special than other variables, > > and that the formal description of strong typing and static types > > should say that the compiler =will= implicitly get the type for $pi > > rather than making it Any. > > Except if constants infer their type and other variables don't, that's > one more special case to remember. What if there were a quick and > unobtrusive way to get the type of the value instead of "Any"? Can we > use a "whatever" type? > > my * $x = 12.34; # my Num $x > my * $y = "abc"; # my Str $y > const * $z = $foobar; # const Foo::Bar $z > > > -David > > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>