develooper Front page | perl.perl6.language | Postings from October 2001

Re: Are .key and .value right for Pairs?

Thread Previous
From:
Mark J. Reed
Date:
October 5, 2001 16:19
Subject:
Re: Are .key and .value right for Pairs?
Message ID:
20011005191832.O6764@charm.turner.com
On Fri, Oct 05, 2001 at 06:59:52PM -0400, Sam Tregar wrote:
> > But you can always define your own accessor methods with whatever
> > names you like. :)
> 
> I can?  How do I do that?
My understanding is that there won't be anything terribly magical
about the built-in datatypes/classes.  So if you want to add your own
methods to PAIR, or even override the provided ones, you can.

The rumor is that you'll also be able to pretty much redefine
the syntax arbitrarily anyway, but I don't think that mechanism
is defined yet, or that such shenanigans will be necessary for just
renaming some methods.

> An associative list is a list of pairs that's used like a hash but
> requires a linear search for reads and writes.
Gotcha.  Thanks.

-- 
Mark J. REED	<markjreed@mail.com>

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About