[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overuse of strings
I just felt obligated to put in my $.02 here and join in opposing the
string syntax for <lib-path>. It is decidedly un-schemish.
Strings are for I/O: they are character sequences that contain data that
is transmitted to humans, the operating system or to other processes,
They should not be used as identifiers (symbols and unique
heap-allocated objects are for that), nor as containers of structured
data (list structures are for that).
>From the SRFI:
(library "hello" "scheme://r6rs"
(display "Hello World")
Here "hello" is used as an identifier: we are not the least bit
interested in the fact that it begins with 'h' and ends with 'o', we are
only interested in whether someone imports a library with exactly the
same name or not.
Likewise, "scheme://r6rs" is used to represent structured data: it is an
URI with the scheme "scheme" and the authority "r6rs". Again, the
textual contents of each of these components aren't interesting, merely
the facts that both of these are identifiers with a special meaning.
So I suggest
"hello" -> hello
"scheme://r6rs" -> (scheme r6rs)
Only users of lesser programming languages are forced to stick with
strings to represent identifiers and structured data. We have symbols
and s-exps. Let's use them.