scheme / scsh

A Unix shell embedded in scheme
Other
382 stars 36 forks source link

Inconsistent behavior with `read` provided in default user environment #39

Open roderyc opened 6 years ago

roderyc commented 6 years ago

Reported by RT Happe quite a while ago

The user environment of scsh 0.7 distinguishes symbols with different capitalisation, e.g. 'gg, 'Gg, and 'GG, but on the other hand provides the standard READ proc that translates the case of symbolic data. That seems somewhat incongruous to me.

Welcome to scsh 0.7 Type ,? for help. (eq? 'Gg 'gg)

f

(run (cat "x.scm")) (Gg) 0 (with-input-from-file "x.scm" read) (gg) ,in scsh-reader (with-input-from-file "x.scm" scsh-read) (Gg)

I would prefer READ (in the user environment) to act like the scsh reader rather than the standard Scheme one (as in scsh 0.6, I believe).

For comparison with scheme48:

Welcome to Scheme 48 1.9 (made by orlo on 2014-07-11) See http://s48.org/ for more information. Please report bugs to scheme-48-bugs@s48.org. Get more information at http://www.s48.org/. Type ,? (comma question-mark) for help. (eq? (string->symbol "Gg") 'gg)

f

(eq? 'Gg 'gg)

t

(with-input-from-file "x.scm" read) (gg)