Re: [racket-users] symbols question

2019-06-21 Thread Kevin Forchione
> On Jun 20, 2019, at 10:18 PM, Sorawee Porncharoenwase > wrote: > > #lang racket > > (require syntax/parse/define) > > (define-simple-macro (#%top . x) 'x) > > (define x 42) > x ;=> 42 > y ;=> 'y > (string-length (symbol->string abcdef)) ;=> 6 > Unbound identifiers are wrapped with #%top

Re: [racket-users] symbols question

2019-06-20 Thread Sorawee Porncharoenwase
Is #%top what you are looking for? #lang racket (require syntax/parse/define) (define-simple-macro (#%top . x) 'x) (define x 42) x ;=> 42 y ;=> 'y (string-length (symbol->string abcdef)) ;=> 6 Unbound identifiers are wrapped with #%top

[racket-users] symbols question

2019-06-20 Thread Kevin Forchione
Hi guys, Every now and then I wonder about the decisions behind the languages we work with and of late I’m wondering about symbols. By default symbols reveal their binding value unless you explicitly tell them not to — in other words unless you quote them. And that’s pretty useful. In macros I