www.delorie.com/gnu/docs/guile/guile_401.html   search  
Buy GNU books!

Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

36.1.2 Read Only Strings

In previous versions of Guile, there was the idea that some string-based primitives such as string-append could equally accept symbols as arguments. For example, one could write

(string-append '/home/ 'vigilia)

and get "/home/vigilia" as the result. The term read only string was adopted to describe the argument type expected by such primitives.

This idea has now been removed. The predicate read-only-string? still exists, but deprecated, and is equivalent to

(lambda (x) (or (string? x) (symbol? x)))

But no Guile primitives now use read-only-string? to validate their arguments.

String-based primitives such as string-append now require strings:

(string-append '/home/ 'vigilia)
ERROR: Wrong type argument (expecting STRINGP): /home/

Deprecated Scheme Procedure: read-only-string? obj
Deprecated C Function: scm_read_only_string_p (obj)
Return #t if obj is either a string or a symbol, otherwise return #f.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003