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

Re: Mutable vs immutable strings

Thread Previous | Thread Next
John Porter
July 10, 2002 05:00
Re: Mutable vs immutable strings
Message ID:

"Clark C . Evans" wrote:
> So, I propose that Parrot supports both of these attitudes
> of reasoning by using a flag.   Initially, all strings
> are 'mutable'.

I concur with Clark.  What he's proposing is (it seems to me)
nothing more than a "read-only" flag, and that's as 
immutable as a variable needs to get.

However, I'm concerned about the performance impact of such a thing.
Perhaps a better approach would be to swap out the mutator methods
with code that throws.

John Douglas Porter

Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About