At 03:23 PM 10/2/00 -0700, Peter Scott wrote:
>At 03:15 PM 10/2/00 -0700, Nathan Wiger wrote:
>>Dan Sugalski wrote:
>> >
>> > Well, yeah, it'll sort of have to if we allow user-defined types. If
>> you do:
>> >
>> > my Dog $spot : male;
>> >
>> > then the Dog package needs to be able to fetch the attributes. I've no
>> idea
>> > how that'd look--perhaps an attributes() function, a method in UNIVERSAL,
>> > or something like that.
>>
>>There's two ways I've proposed in different RFC's. The first one
>>utilizes a more general framework; the second one depends on C<tie>
>>being used. A UNIVERSAL:: method wouldn't work because you've got to get
>>attributes from arrays and hashes as well.
>
>Maybe I'm just being dense, but why shouldn't arrays and hashes inherit
>attributes from UNIVERSAL? tie()ing an array is really just like being
>able to call object methods on it distinct from its members, no? So
>arrays and hashes could be objects too. Hmm, am I saying that I should be
>able to write @array->method()?
Sure, why not? I'd love to be able to throw things into the HASH package
now and do %foo->something. Not often, mind, but occasionally...
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk