[EMAIL PROTECTED] (Han-Wen Nienhuys) writes:

> In article <[EMAIL PROTECTED]>,
> Ludovic Courtès <[EMAIL PROTECTED]> wrote:

[...]

>>This second modification has a nice effect: it can significantly reduce
>>the number of objects created at load-time.  Unfortunately, Guile's
>>built-in reader always produces Scheme strings (in `scm_read_token ()')
>>so it cannot benefit from this optimization.
>
> Why isn't it possible to write a
>
>   take_symbol_from_string()
>
> which takes the C-string inside the SCM string, and sets the data of
> the SCM string to NULL? Or am I missing wrt to shared strings? 

I'd say because the underlying `stringbuf' cannot be shared between a
symbol and a string.

Theoretically, it should be doable but we'd have to generalize things
like `scm_i_string_writable_chars ()' so that it works also for symbols.

Thanks,
Ludovic.



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

Reply via email to