I am trying to make a language based on Racket in which a.b would not be 
allowed as an identifier, rather it would expand to something like (b a). 
Seems like a job for read-cdot, right? Well I quickly learned it's not that 
simple. With read-cdot on (define a.b 3) is not an error, rather it becomes 
(define (#%dot a b) 3) which is obviously not what I wanted. So maybe 
read-cdot (and the read phase in general) is not the right approach.

So my next thought was using #%top to transform a.b into (b a). This will 
work, but it doesn't stop the user from using dots in identifiers.

Is there an easy way to disallow certain characters in identifiers? I 
realized it's not just dots I want to disallow, but also operators like + 
which might be interpreted as infix in certain contexts.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to