bug-guile
[Top][All Lists]
Advanced

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

`intern-symbol' takes string or symbol?


From: Thien-Thi Nguyen
Subject: `intern-symbol' takes string or symbol?
Date: Wed, 18 Jul 2001 17:10:54 -0700

the docs for `intern-symbol' say:

 - primitive: intern-symbol obarray string
     Add a new symbol to OBARRAY with name STRING, bound to an
     unspecified initial value.  The symbol table is not modified if a
     symbol with this name is already present.

however, in the guile-1.5.0 repl, i see:

 guile> (define o (module-obarray (current-module)))
 guile> (intern-symbol o "hello")
 Backtrace:
 In standard input:
   19: 0* [intern-symbol #(() () () ((o . #)) () () () () () ...) "hello"]
 
 standard input:19:1: In procedure intern-symbol in expression (intern-symbol o 
"hello"):
 standard input:19:1: Wrong type argument in position 2 (expecting SYMBOLP): 
"hello"
 ABORT: (wrong-type-arg)

 guile> (intern-symbol o 'hello)
 guile>

"intern" type procs have traditionally taken strings, so the
documentation seems more right to me than the actual behavior.
perhaps someone got confused by the name, thinking the proc arg
should be a symbol?

although this proc is marked "deprecated" (along w/ everything
else in libguile/symbols-deprecated.[hc]), it should still be
fixed.

thi



reply via email to

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