From: Ken A. <kan...@bb...> - 2004-05-28 16:31:28
|
OK, we can keep with Java litterals, but (string->number) should convert according to radix. Can you fix that? It's getting in the way of a release. k At 11:04 AM 5/28/2004 -0400, Timothy John Hickey wrote: >On May 28, 2004, at 10:44 AM, Ken Anderson wrote: > >>Now we can't parse a number with a leading "0" even if we say base 10. >>>(string->number "08") >>#f >>>(string->number "08" 10) >This is clearly not good. I'll fix it! > >>#f >>>(string->number "8" 10) >>8 > > > >> >>Can we make this base 8 stuff optional? >We can back out these changes for now if it is causing backward compatibility problems.... > >> Usually when i see a leading 0 in data it is expecting to be interpreted as base 10. For example May is month "05". >We could go back to the original interpretation and have 08 be converted to 8.0.... > >The problem here is that a program can contain > 0100 >and we wouldn't know whether they meant that in base 8 or base 10. >The only time a leading zero number would be base 10 is if it happens to contain an 8 or 9, >this seems like it could generate hard to catch bugs! > >One nice thing we've done with Jscheme is have the literal syntax be almost exactly the same >as Java literal syntax. This makes it easy for Java programmers (and easy for us as we don't have >to write a special manual about the syntax of literals). > >We also have a Scheme literal mode > (set! jsint.U.useJavaMode #f) >which turns off the Java literal mode .... > >For now, we could have a backward compatibility switch that reverts to the old style, >but I think for the future it will be easier for us if we stick to pure Java literal syntax.. > >> >>k >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: Oracle 10g >>Get certified on the hottest thing ever to hit the market... Oracle 10g. >>Take an Oracle 10g class now, and we'll give you the exam FREE. >>http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click >>_______________________________________________ >>Jscheme-user mailing list >>Jsc...@li... >>https://lists.sourceforge.net/lists/listinfo/jscheme-user |