guile-devel
[Top][All Lists]
Advanced

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

Re: What's with `symbol-set!' is deprecated. Use the module system inste


From: David Kastrup
Subject: Re: What's with `symbol-set!' is deprecated. Use the module system instead.
Date: Sun, 04 Dec 2011 17:01:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

David Kastrup <address@hidden> writes:

> The module system documentation provides _no_ _clue_ _whatsoever_ about
> how something like
> (symbol-set! #f (string->symbol name) value)
> could be replaced.  In fact, the module system documentation provides
> _no_ _clue_ _whatsoever_ how to actually access module variables short
> of calling eval on little programs working with symbols.
>
> I don't want to call eval for the simple act of setting a symbol to a
> value.
>
> The funny thing is that symbol-fset! and symbol-pset! are documented.
> But nothing whatsoever that could set a symbol value itself on a symbol
> that has been generated.
>
> What's up with that?

Well, I disassembled enough to come up with
(module-define! (current-module) (string->symbol name) value)

It is not like there is _any_ documentation for this in the manual.

Is this somebody's idea of a joke?

-- 
David Kastrup




reply via email to

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