Re: [racket-users] -i as an identifier

2020-09-10 Thread Robby Findler
The r6rs number syntax has explicit cases for +i and -i http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-7.html#node_sec_4.2 Robby On Thu, Sep 10, 2020 at 7:27 PM Sorawee Porncharoenwase < sorawee.pw...@gmail.com> wrote: > I think you read the doc correctly, but there are programs that use +i

Re: [racket-users] -i as an identifier

2020-09-10 Thread Sorawee Porncharoenwase
I think you read the doc correctly, but there are programs that use +i and -i, so it's unclear if fixing the reader is desirable. Perhaps the documentation should be adjusted instead. Here’s an example of how people use +i and -i:

[racket-users] -i as an identifier

2020-09-10 Thread Sage Gerard
It looks like -i cannot be used as an identifier because it evaluates to the complex number 0-1i. So in the v7.8 REPL, (define -i "foo") fails. I noticed this when trying to map CLI flag strings to identifiers. -i was the only one in the set to fall over. In the Reading Numbers section of the