guile-devel
[Top][All Lists]
Advanced

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

Re: strings rationale


From: Rob Browning
Subject: Re: strings rationale
Date: 15 Aug 2001 10:28:38 -0500
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Tom Lord <address@hidden> writes:

> Can symbols be used as strings?  Can there be substrings of symbols?

After reading this thread, I have to say that I really don't like the
idea of symbols being transparently interchangable in *any* context
with strings.  Some of the arguments I've heard in favor of this
change sound like they could also be used to argue for the
interchangability of integers and strings, and I doubt anyone would be
in favor of that.  In fact, just that kind of type vagary is the
single thing I hate most about Tcl.

Further, if you do make strings and symbols interchangable, what do
you do about:

  - case sensitivity?

  - performance?  Consider future compilation optimizations -- i.e. I
    believe stalin doesn't even keep the symbol string representations
    around if it doesn't ever need to read/write them.  While you
    might be able to do the same trick with a shared symbol/string
    type, we should be careful to consider the issue before making the
    types similar.

In general, I tend to think that this kind of change would be making a
promise to people writing code that we'd be permanently stuck with,
even if it turned out to be a bad idea later, and we shouldn't do that
without *compelling* reasons, and the general support of the broader
Scheme community.

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD



reply via email to

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