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?

Or, to rephrase the question, I would assume that the above allows $path to be resolved runtime, not just compiletime, or its utility seems sadly limited. So if implementor classes can be instantiated at runtime, are they really C<is> compile-time properties, or are they 'is' meaning 'isa', and is that runtime-settable? [*1]

(Thinking aloud) Perhaps this is an example of why having both "is" and "isa" as keywords might be a good idea. Because 'is' implies compiletime, but implementor classes aren't really properties, they're a form of (pseudo?)inheritance. So maybe

my %data isa FileBasedHash($path);
-or-
my $b isa $a;

Might be clearer(???) than reusing C<is> for this purpose. Dunno. [*2]

MikeL

[*1] It almost seems like
my %data but FileBasedHash($path);
would be more appropriate, but I think we can agree that's *horrid*.

[*2] This ties strongly into the whole issue of allowing some form of prototype-based (classless) inheritance. I try to avoid it, but damn it, *it keeps pulling me back in*! Right now I just need to know what 'is' is, for the sake of arrays and hashes.

:-/

Reply via email to