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)`


>  - 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


> 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.
>


--
Jay McCarthy
Associate Professor @ CS @ UMass Lowell
http://jeapostrophe.github.io
Vincit qui se vincit.

-- 
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/CAJYbDanKjP3D6eyJ8cKbmLNAh48S6nJKno4hmEYwp1tHsjnRMw%40mail.gmail.com.

Reply via email to