John Cowan <xxxxxx@mercury.ccil.org> schrieb am So., 26. Juni 2016 um 01:07 Uhr:
Marc Nieper-Wißkirchen scripsit:

> However, we should not discourage implementations that implement SRFI
> 135 natively to implement it in a way such that each text can also
> regarded as a symbol and vice versa.

I entirely disagree with this.  At most I would support a one-way
relationship whereby symbols may be texts but not vice versa.  In any
implementation, symbols have an overhead because they are interned,
and that should not be imposed on text-handling programs that
deal with a large number of texts (which would inflate the symbol
table).  Maclisp used symbols as strings with similar costs;

An implementation may intern symbols lazily. For such an implementation the overhead may go to zero.

Of course, for all other implementations, "text = symbol" would not feasible. However, such implementation are free to not make texts and symbols equal even if the spec *allows* that text and symbol are denoting the same type.

I would be happy with encouraging programs to treat symbols as textuals,
however.  That's what Common Lisp does: some of its string functions
accept symbols (possibly for backward compatibility with converted Maclisp
code), and the cost of 3-morphism isn't much higher than 2-morphism,
though monomorphism is cheapest.

If we guaranteed the implication (symbol? x) => (text? x), we wouldn't need to talk about an external representation, would we? In that case, we could use always symbols as the external representation, which would be good because we didn't have to modify the reader (which cannot be done portable) or introduce new datum syntax.

Marc