guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another alternative string representation proposal


From: Carl R. Witty
Subject: Re: Another alternative string representation proposal
Date: 25 Sep 2000 11:45:41 -0700

Keisuke Nishida <address@hidden> writes:

> >  * owner_p is a boolean value that indicates whether the char-field is
> >    actually the owner of the character field, i. e. whether the character
> >    field should be freed if the char-field is garbage collected.
> 
> Is owner_p really necessary?  If a char-field is read-only, it is not
> the owner of the character sequence.  If it is mutable or immutable,
> we can force the char-field to own the sequence.
> 
> If a char-field is mutable and it does not own the sequence, it means
> Guile is modifying memory space allocated by the user.  I don't think
> it's a very good idea.  On the other hand, I don't see any reason why
> a character sequence must be read-only when Guile manages it.

I can see at least one potential use for a mutable, not-owned string:
it could be used by a guile wrapper for mmap.  Although probably it
would be better to use a different, specialized type for this; so
that's not much of an argument...

Carl Witty



reply via email to

[Prev in Thread] Current Thread [Next in Thread]