Oh boy, it's OO syntax nargery time again. *sigh*.
On Wed, Dec 06, 2000 at 10:51:14AM -0800, Nathan Wiger wrote:
> @array->length
> %hash->keys
>
> Simply keeping @arrays and %hashes as buckets for SV's wouldn't let you
> do this.
I don't think that's true. At all.
> An "SV" would really just be an AV with
> one value. HV's would remain separate since there's more to them (direct
> access, etc) than just multiple values. Again, just something worth
> tossing around.
I'm in favour of the exact opposite: an AV is "just" an SV-alike vtable
with array methods instead of scalar methods and a pointer to some
storage, (probably an array of SVs) and likewise an HV. That would allow
(array->length)() which seems to be what you want above.
> I think it would be cool
Good for you. This is internals design; perl6-language is over there --->
and the "ph33r mY |<ewl dr3am 5inta><" phase is supposed to be over now
anyway.
> It's probably worth discussing the "typeglobs must die" issue here as
> well (even though I like them :-).
No, it's probably not.
--
"Having just ordered 40 books and discovered I have no change out of a grand,
I'm thinking of getting a posse together and going after some publishers. I'd
walk into a petrol station and buy lots of petrol on Monday, too, but I think
I'd get funny looks. More funny looks." - Mark Dickerson