I'm thinking that if strong typing is enabled, mixing untyped and typed things will cause warnings or errors that need not be there. 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.

Moritz Lenz moritz-at-casella.verplant.org |Perl 6| wrote:
Doesn't perl do this when you don't specify a type?

constant $pi = sub_that_calcs_pi();

Since static types are optional, I don't see the point in explicitly
speccing type inference. That's only stating that type information is
determined at compile time, which seems like an optimization to me that
doesn't need to be in perl 6.0.0. Of course any implementer is welcome
to do perform that optimization where possible ;-)


Reply via email to