From: Geoffrey K. <ge...@kn...> - 2004-06-07 15:24:55
|
On Jun 7, 2004, at 10:44, Timothy John Hickey wrote: > This little issue actually goes to the heart of JScheme since what is=20= > unique about Jscheme is the tight > integration with Java and that integration is made possibly by our=20 > decision to adopt the Java primitive types > as the Scheme base types. The Java literal syntax is then essential to=20= > making JScheme integrate smoothly with > Java. This is a worthy goal. I certainly remember how impressed I was when=20 the first Java language and VM specs came out, so painstakingly=20 developed. But then even Java has warts, for example: "How Java=92s Floating-Point Hurts Everyone Everywhere" http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf Principle of Least Surprise ... What is more of an unpleasant surprise? 1. (string->number "08") =3D> 8 2. (string->number "08") =3D> #f 3. (string->number "010") =3D> 10 4. (string->number "010") =3D> 8 My feeling is that anyone who wants octal interpretation won't mind=20 saying so: (string->number "010" 8) =3D> 8 Good morning, Alexander. How old will you be next year? 010 I see you entered a leading zero. You're too clever. I wasn't=20 expecting that. Like many 7 year-olds, I bet sometimes you wish you=20 were 10. Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk |