From: Kevin Ryde Date: Tue, 2 Sep 2003 23:57:49 +0000 (+0000) Subject: (Symbol Primitives): In gensym, cross reference X-Git-Url: http://git.hcoop.net/bpt/guile.git/commitdiff_plain/90a5894d05ea7ee10fa68e7410b280afdc541daa (Symbol Primitives): In gensym, cross reference uninterned symbols, use @w{} on " g" prefix to avoid any chance of a line break obscuring it. --- diff --git a/doc/ref/scheme-data.texi b/doc/ref/scheme-data.texi index 03ad950df..7fa4ac6bd 100755 --- a/doc/ref/scheme-data.texi +++ b/doc/ref/scheme-data.texi @@ -2743,15 +2743,16 @@ code. The @code{gensym} primitive meets this need: @deffnx {C Function} scm_gensym (prefix) Create a new symbol with a name constructed from a prefix and a counter value. The string @var{prefix} can be specified as an optional -argument. Default prefix is @samp{ g}. The counter is increased by 1 +argument. Default prefix is @samp{@w{ g}}. The counter is increased by 1 at each call. There is no provision for resetting the counter. @end deffn The symbols generated by @code{gensym} are @emph{likely} to be unique, since their names begin with a space and it is only otherwise possible to generate such symbols if a programmer goes out of their way to do -so. The 1.8 release of Guile will include a way of creating -symbols that are @emph{guaranteed} to be unique. +so. Uniqueness can be guaranteed by instead using uninterned symbols +(@pxref{Symbol Uninterned}), though they can't be usefully written out +and read back in. @node Symbol Props