Nicholas Clark wrote: [...] > If the compiler were able to see that my Date $bday = 'June 25, 2002'; > is one statement that both types $bday as Date, and then assigns a > constant to it, is it possible to do the conversion of that constant > to a constant $bday object at compile time? (and hence get compile > time checking) Without affecting general run time behaviour.
While that may be possible (I can't tell, I gladly take Dan's word for it), it doesn't make much sense IMHO. It means that you can only initialize those objects with constants. That's not a problem for people who know Perl well, but it is going to be one hell of a confusion for anybody learning Perl. I can see people whining on clpm why they can't do "my Dog $rex = sub_returning_string();". Again IMHO, taking Perl's flexibility in *some* cases is much worse than making it Java. Steffen -- @n=(544290696690,305106661574,116357),$b=16,@c=' ,JPacehklnorstu'=~ /./g;for$n(@n){map{$h=int$n/$b**$_;$n-=$b**$_*$h;$c[@c]=$h}c(0..9); push@p,map{$c[$_]}@c[c($b..$#c)];$#c=$b-1}print@p;sub'c{reverse @_}