Jay McCarthy writes:

> On Fri, Nov 8, 2019 at 9:51 AM Christopher Lemmer Webber <
> cweb...@dustycloud.org> wrote:
>
>> I have a need to do two things in a #lang:
>>
>>  - Most importantly, make all strings that appear in the source code
>>    immutable
>>
>
> Make #%datum turn literal strings `s` into `(string->immutable-string s)`

Philip has seemed to suggest that maybe this isn't necessary (?)
but it's useful to understand how #%datum helps here

>>  - Second and not as urgent, I'd like to add a "dot" notation, so that
>>    (foo.bar 1 2 3) expands into (foo 'bar 1 2 3)
>>
>
> Turn on `read-cdot` and then make the `#%dot` macro put a quote on the RHS
> and have #%app notice a #%dot and unwrap it
>
> Jay

Okay thanks, I'll give that a try!

>> It seems to me that both of these needs are similar.  I can imagine how
>> to do both by thinking of the syntax tree like a list structure and
>> rewrite via recursive descent.  I guess I would re-append the src
>> locations to the new structure.  This seems doable.
>>
>> But is it the best way?  I'm guessing maybe there's a more racket'y way
>> but I'm unsure.
>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/87a796hvip.fsf%40dustycloud.org.

Reply via email to