In Perl a string is mutable.
Actually in Perl 5 that's an implementation detail. You can't modify string literals, you can only mutate variables which hold strings. A (non-XS) Perl programmer wouldn't see the difference to an immutable string.
But yet, many modern languages tend towards immutable basic data types because it makes multi threading easier - an immutable value can be shared between threads without the need for locking or copying.
In reply to Re: programming languages and immutable data types
by moritz
in thread programming languages and immutable data types
by mattk1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |