develooper Front page | perl.perl6.internals | Postings from July 2002

Re: Mutable vs immutable strings + PMC docs, method dispatch

Dan Sugalski
July 11, 2002 11:57
Re: Mutable vs immutable strings + PMC docs, method dispatch
Message ID:
At 10:46 AM -0700 7/11/02, Scott Walters wrote:
>>  There were serialization/deserialization in the PMC vtables at one
>>  point, but that's gone. I think I may add it back in, though of
>>  course no PMC is required to provide them.
>Please !  -=)
>Hi everyone. I'm going to try to take on some work. I also want to play
>"person in second row" and bug Dan.

Heh. I assume this should be going to p6i as well as just me, so CC 
line twiddled appropriately. (And remind be to bring a Nerf dart gun 
with me to my talks)

>1. Is there a resource for PMC authors? If not, I'd be ecstatic to 
>maintain one.
>    If anyone is working on a Mmap PMC, go ahead and pop my balloon right now.

Not at the moment. I've got the web pages checked out 
of CVS, so if you want to do some stuff for, well, 

>2. Method dispatch.
>    I'd love to see dispatch handled by an Object PMC, that took the 
>method name
>    and list of arguments in the same way that a multidimentional Hash or Array
>    took its index list. This would get method resolution out of the 
>core. Decouple,
>    abstract.

That's what the PMC find_method vtable entry is supposed to return. 
(Well, OK, it's supposed to return a method PMC that we can 
subsequently call, but...)

>3. Immutables.
>    A lot of things are metting mashed together.

Yep. Not generally a good thing, and we need to be clearer.

Mutable strings make much of what perl needs go faster, especially 
when coupled with COW to make cloning strings generally cheaper. Yes, 
it does make things less ideal for other languages, but perl mashes 
the heck out of string data, so it's a general win for us. (It's also 
the reason for the split DOD/GC scheme)

Nailing down the semantics, and when things can and can't modify 
their passed-in data and when they can (as well as what returns a 
copy of a string and what returns the actual string) needs to be done.

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai                         have teddy bears and even
                                       teddy bears get drunk Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About