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()? There again, maybe it's just this head cold I've got. -- Peter Scott Pacific Systems Design Technologies
- Re: Variable attributes (was Re: RFC 355 (v1) Leave $[ alon... Peter Scott
- Variable attributes - Object-oriented John Porter
- Re: Variable attributes - Object-oriented Nathan Wiger
- Re: Variable attributes - Object-oriented Peter Scott
- Re: Variable attributes (was Re: RFC 355 (v1) Leave $[... Dan Sugalski
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... Jeremy Howard
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... Nathan Wiger
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... Peter Scott
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... Dan Sugalski
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... Nathan Wiger
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... Peter Scott
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... Nathan Wiger
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... Dan Sugalski
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... Peter Scott
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... Nathan Wiger
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... Peter Scott
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... Nathan Wiger
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... John Porter
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... Dan Sugalski
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... John Porter
- Re: Variable attributes (was Re: RFC 355 (v1) Leav... David L. Nicol