Re: Underscores in numbers for legibility
Peter Bex 12 Apr 2019 19:55 UTC
On Fri, Apr 12, 2019 at 09:32:55AM -1000, Shiro Kawai wrote:
> On Fri, Apr 12, 2019 at 9:09 AM Lassi Kortela <xxxxxx@lassi.io> wrote:
> > The question is, does it interfere with symbols if it's supported
> > without the #d prefix (e.g. 1_000_000).
>
> Not really. RnRS doesn't allow symbols to begin with numeric digits
> (unless it is escaped), so it won't conflict.
> Gauche treating them as symbols is just an artifact of old Lisp convention,
> which is "word that can't be parsed as numbers are symbols"---besides, I
> was rather conservative to introduce "underscores in numbers" feature. If
> we establish that convention I'll adapt Gauche to it.
Same here for CHICKEN, but I'm a bit hesitant to go in and complicate
the numerical syntax of Scheme. We just got rid of the ridiculous hash
syntax (which _really_ complicated Scheme numerical syntax)!
Cheers,
Peter