From: Ken A. <kan...@bb...> - 2004-06-07 16:46:03
|
I'm glad we have people like Alexander helping us design JScheme. I've changed the code so that (string->number "010") -> 10. If you need to read java literals use string->expr. k At 11:24 AM 6/7/2004 -0400, Geoffrey Knauth wrote: >On Jun 7, 2004, at 10:44, Timothy John Hickey wrote: >>This little issue actually goes to the heart of JScheme since what is u= nique about Jscheme is the tight >>integration with Java and that integration is made possibly by our deci= sion to adopt the Java primitive types >>as the Scheme base types. The Java literal syntax is then essential to = making JScheme integrate smoothly with >>Java. > >This is a worthy goal. I certainly remember how impressed I was when th= e first Java language and VM specs came out, so painstakingly 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 sayi= ng 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 expectin= g that. Like many 7 year-olds, I bet sometimes you wish you were 10. > >Geoffrey >-- >Geoffrey S. Knauth | http://knauth.org/gsk > > > >------------------------------------------------------- >This SF.Net email is sponsored by: GNOME Foundation >Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. >GNOME Users and Developers European Conference, 28-30th June in Norway >http://2004/guadec.org >_______________________________________________ >Jscheme-devel mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-devel |