Re[2]: Mutable Bytes

Lenard Lindstrom <[email protected]> Mon, 26 Jul 2004 19:26:10 -0700 (Pacific Daylight Time)
Newsgroups gmane.comp.lang.prothon.user
Message-ID <Mahogany-0.66.0-4294505119-20040726-201219.00@pop3.norton.antivirus>
On Mon, 26 Jul 2004 23:55:44 +0200 Martin Christensen <[email protected]> wrote:

> >>>>> "Lenard" == Lenard Lindstrom <[email protected]> writes:
> Lenard> Byte code is a low level feature that is not considered
> Lenard> portable across versions. So it makes sense to discourage
> Lenard> direct manipulation of the byte code. If Prothon binary data
> Lenard> is made visible within the langauge as byte strings does it
> Lenard> make sense to allow direct changes to them?
> 
> You can already overload just about anything to your heart's content,
> and no-one's stopping you from doing so. I don't see that storing
> bytecode in mutable objects increases or decreases anyone's ability to
> shoot himself in the foot if he should want, nor do I think that it
> would encourage foolish practices. Making Bytes mutable doesn't enable
> people to do something they couldn't otherwise do; it just makes it a
> little bit less tedious to do so. Moreover, Bytes has a significantly
> wider scope of use, I should hope, than merely storing Prothon's own
> bytecode. I think that it's more important to look at how the type
> would be used in the general case rather than one specific case, even
> if that specific case is very important.
> 
Like Python, Prothon could have a separate, mutable, array type. But Mark has
reminded me that object locking can turn a mutable object into an immutable one.

Lenard Lindstrom
<[email protected]>