Bug 486 - Strange set! behavior that creates top-level binding
Summary: Strange set! behavior that creates top-level binding
Alias: None
Product: UIM
Classification: Unclassified
Component: libuim: Scheme interpreter (show other bugs)
Version: unspecified
Hardware: All All
: low enhancement
Assignee: YamaKen
QA Contact:
Depends on: 481
Blocks: 7164
  Show dependency treegraph
Reported: 2004-04-17 07:57 UTC by YamaKen
Modified: 2007-01-13 17:15 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description YamaKen 2004-04-17 07:57:01 UTC
set! creates top-level binding as follows. This is confusing several developers
and users.

uim> foo
ERROR: unbound variable (errobj foo)

uim> (set! foo 'bar)
uim> foo
Comment 1 TOKUNAGA Hiroyuki 2004-04-22 02:30:35 UTC
Fixed. See svn diff -r 734:735
Comment 2 YamaKen 2004-04-22 17:10:17 UTC
I think that set-symbol-value! also have to behave as same as set!. Currently
set-symbol-value! is directly bound to setvar(), so wrapper function is required.

uim> hoge
ERROR: unbound variable (errobj hoge)

uim> (set-symbol-value! 'hoge 1)
uim> hoge
Comment 3 TOKUNAGA Hiroyuki 2004-04-24 03:01:03 UTC
 set-symbol-value! (and also symbol-value) doesn't exists at R5RS. So if it's
not very convenient, simply removing it would be enough. (In other words, if it's 
convenient enough, we should use it.) What do you think about this idea?
Comment 4 YamaKen 2004-04-24 04:15:14 UTC
I think that set-symbol-value! (and symbol-value) is required to implement some
 uim features. Yes, they are not exiting at R5RS world, and I can't find
corresponding procedures. Should I read SRFIs?

Regardless of procedure name, I think that set-symbol-value! or the
corresponding one should not create top-level binding.
Comment 5 YamaKen 2006-06-09 00:54:55 UTC
It will be resolved in uim 1.2.0 by SigScheme's set! implementation, and
replaced with a portable proc such as follows in uim 1.3.0.

(define set-symbol-value!
  (lambda (sym val)
    (eval '(set! sym val)
Comment 6 YamaKen 2007-01-13 17:15:07 UTC
Resolved in uim 1.4.0 by SigScheme introduction.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.