Re: OO AV/HV's and tie (was Re: Meta-design)

2000-12-07 Thread Dan Sugalski
At 06:01 PM 12/7/00 +, Piers Cawley wrote: >Dan Sugalski <[EMAIL PROTECTED]> writes: > > At 01:20 PM 12/7/00 +, David Mitchell wrote: > > >Dan Sugalski <[EMAIL PROTECTED]> wrote: > > > > > > > print $foo[0]; > > > > is > > > >foo->get_string[UTF_8](ARRAY, 0); > > > > while > > > >

Re: OO AV/HV's and tie (was Re: Meta-design)

2000-12-07 Thread Dan Sugalski
At 07:02 PM 12/7/00 +, Simon Cozens wrote: >On Wed, Dec 06, 2000 at 03:11:33PM -0500, Dan Sugalski wrote: > > >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

Re: OO AV/HV's and tie (was Re: Meta-design)

2000-12-07 Thread Simon Cozens
On Wed, Dec 06, 2000 at 03:11:33PM -0500, Dan Sugalski wrote: > >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->leng

Re: OO AV/HV's and tie (was Re: Meta-design)

2000-12-07 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 01:20 PM 12/7/00 +, David Mitchell wrote: > >Dan Sugalski <[EMAIL PROTECTED]> wrote: > > > > > print $foo[0]; > > > is > > >foo->get_string[UTF_8](ARRAY, 0); > > > while > > >print $foo > > > is > > >foo->get_string[UTF_8](SCALAR);

Re: OO AV/HV's and tie (was Re: Meta-design)

2000-12-07 Thread Dan Sugalski
At 01:20 PM 12/7/00 +, David Mitchell wrote: >Dan Sugalski <[EMAIL PROTECTED]> wrote: > > > print $foo[0]; > > is > >foo->get_string[UTF_8](ARRAY, 0); > > while > >print $foo > > is > >foo->get_string[UTF_8](SCALAR); > >Just to clarify: > >does the get_string method in an AV's

Re: OO AV/HV's and tie (was Re: Meta-design)

2000-12-07 Thread David Mitchell
Dan Sugalski <[EMAIL PROTECTED]> wrote: > print $foo[0]; > is >foo->get_string[UTF_8](ARRAY, 0); > while >print $foo > is >foo->get_string[UTF_8](SCALAR); Just to clarify: does the get_string method in an AV's vtable do an indexing lookup, grab the relevant SV pointer, then call

Re: OO AV/HV's and tie (was Re: Meta-design)

2000-12-06 Thread Dan Sugalski
At 12:48 PM 12/6/00 -0800, Nathan Wiger wrote: > > Good for you. This is internals design; perl6-language is over there ---> > > and the "ph33r mY |<" phase is supposed to be over now > > anyway. > >Cool! Thanks alot for the useful feedback. Comments like this are >certainly beneficial to the goal

Re: OO AV/HV's and tie (was Re: Meta-design)

2000-12-06 Thread Nathan Wiger
Simon Cozens wrote: > > Oh boy, it's OO syntax nargery time again. *sigh*. > > I think it would be cool > > Good for you. This is internals design; perl6-language is over there ---> > and the "ph33r mY |<" phase is supposed to be over now > anyway. Cool! Thanks alot for the useful feedback. Co

Re: OO AV/HV's and tie (was Re: Meta-design)

2000-12-06 Thread Dan Sugalski
At 07:34 PM 12/6/00 +, Simon Cozens wrote: >On Wed, Dec 06, 2000 at 10:51:14AM -0800, Nathan Wiger wrote: > > Don't forget we can mix-and-match C/C++ to some degree > >for added portability! > >-- >If computer science was a science, computer "scientists" would study what >computer systems do a

Re: OO AV/HV's and tie (was Re: Meta-design)

2000-12-06 Thread Dan Sugalski
At 07:55 PM 12/6/00 +, Simon Cozens wrote: >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.

Re: OO AV/HV's and tie (was Re: Meta-design)

2000-12-06 Thread Simon Cozens
On Wed, Dec 06, 2000 at 10:51:14AM -0800, Nathan Wiger wrote: > Don't forget we can mix-and-match C/C++ to some degree for added portability! -- If computer science was a science, computer "scientists" would study what computer systems do and draw well-reasoned conclusions from it, instead of

Re: OO AV/HV's and tie (was Re: Meta-design)

2000-12-06 Thread Simon Cozens
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

OO AV/HV's and tie (was Re: Meta-design)

2000-12-06 Thread Nathan Wiger
Simon Cozens wrote: > > =head2 Implementation Language > > C++ gives us OO and headaches, is wildly non-portable due to a lack of > decent implementations, and we don't have enough experience of it. C's > portable and everyone knows it, but it's a swine for doing OO things. Don't forget we can