At 9:23 AM -0800 1/14/03, Michael Lazzaro wrote:
On Tuesday, January 14, 2003, at 02:24  AM, Piers Cawley wrote:
Michael Lazzaro <[EMAIL PROTECTED]> writes:
Great -- then I have only one more question, I think.  In the words of
a certain cartoon character, what's *this* button do?

   my $b is $a;
Compile time error. 'is' is a compile time property, scalar values
aren't.
That's what I first thought, but... why is that a compiletime error, if the previous example

my %data is FileBasedHash($path);

is not?
I'm not sure either of them *has* to be an error, as the compile-time properties that is imparts need to be evalutated and applied at runtime. The "my $foo is $bar" would mean that we couldn't do any compile-time type checking, but that's not a huge deal as presumably you wouldn't *want* any type checing in that case.

Whether it is a good idea or not from a maintenance/programmer-brain standpoint is a separate issue. I think I'd rather dislike having to maintain code that did it, but I can see a few good reasons to do it.
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk

Reply via email to