Re: [racket-users] What's the best way to do these syntax transforms?

2019-11-08 Thread Philip McGrath
On Fri, Nov 8, 2019 at 5:06 PM Christopher Lemmer Webber < cweb...@dustycloud.org> wrote: > Huh... somehow I had thought that I had heard that Racket has mutable > strings by default. It cropped up on my TODO list because of that. I > wonder what gave me that impression? > Racket strings are

Re: [racket-users] What's the best way to do these syntax transforms?

2019-11-08 Thread Philip McGrath
On Fri, Nov 8, 2019 at 2:58 PM Matthew Flatt wrote: > More precisely, the reader (via `read-syntax`) creates immutable > strings. > > If a macro constructs a mutable string and converts it to a syntax > object, the string is not converted to an immutable string. Maybe it > should be. > I see

Re: [racket-users] What's the best way to do these syntax transforms?

2019-11-08 Thread Christopher Lemmer Webber
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

Re: [racket-users] What's the best way to do these syntax transforms?

2019-11-08 Thread Christopher Lemmer Webber
Philip McGrath writes: > On Fri, Nov 8, 2019 at 9:56 AM Jay McCarthy wrote: > >> 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

Re: [racket-users] What's the best way to do these syntax transforms?

2019-11-08 Thread Matthew Flatt
At Fri, 8 Nov 2019 11:28:46 -0500, Philip McGrath wrote: > On Fri, Nov 8, 2019 at 9:56 AM Jay McCarthy wrote: > > > 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,

Re: [racket-users] What's the best way to do these syntax transforms?

2019-11-08 Thread Philip McGrath
On Fri, Nov 8, 2019 at 9:56 AM Jay McCarthy wrote: > 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

Re: [racket-users] What's the best way to do these syntax transforms?

2019-11-08 Thread Jay McCarthy
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

[racket-users] What's the best way to do these syntax transforms?

2019-11-08 Thread Christopher Lemmer Webber
I have a need to do two things in a #lang: - Most importantly, make all strings that appear in the source code immutable - 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) It seems to me that both of these needs are