From: Jonathan A R. <ja...@mu...> - 2004-05-30 14:29:57
|
This discussion wasn't clear to me but I assume you're going to have (string->number "011" 8) => 9 (string->number "011" 10) => 11 So the question is what to do about (string->number "011") My vote as usual is when in doubt follow a Scheme report, because someone might consult a report when using jscheme. If you want to have something to parse Java literal syntax, give it a different name; then you could sensibly extend it to other kinds of literals, e.g. (parse-java-literal "true") => #t (parse-java-literal "'t'") => #\t (parse-java-literal "\"true\"") => "true" But if the Java literal parser has to have the name string->number either for backward compatibility or to suit your taste, that's not terrible; I always give it an explicit radix anyhow. Jonathan |