
Thanks! Looks like John got that one just after v7.8: https://github.com/racket/racket/commit/39a8a50d0ae3d96cfeefd3e92de061ecc280a4c0

Now with Save and Open. I should probably make it a package at this point…

is there an easy way to convince the reader to read .
as just a symbol, rather than triggering infix-conversion or prohibiting it altogether (via read-accept-dot = #f, or read-accept-infix-dot = #f)?

My gut reaction is “no”.

But maybe a reader-macro can be used?

my scenario is, I’m trying to read-syntax, and I want to get verbatim close to the originally-typed syntax as possible. But e.g. (1 . < . 2)
reads as (< 1 2)
and the srcloc information is all messed up

From the docs of read-table
: char like-char readtable — causes char to be parsed in the same way that like-char is parsed in readtable,
Maybe you can make .
read the same way as, say, a
?


Since the parameter current-readtable
controls the read-table used by read
I think it could work.

that did it, thanks!

now I just have to get it to work in the rest of my program; it seems to be being ignored at the moment :disappointed:

I think, I saw a package for “programmatic editing” at some point. Perhaps it was your package?

nope, not me, sorry

Found it. https://docs.racket-lang.org/progedit/index.html Don’t know if it handles double-dots.

Does Racket have set-car! and set-cdr!? I could swear I’ve used those before. Were they removed? If so, how do you now accomplish what they used to do?



Thank you so much! I appreciate it!

That’s fantastic, @camoy, thanks!

A mutable hash table is not considered functional programming, is it?

Usually mutable state slants more towards the imperative end. It’s a vague and subjective thing however, and that doesn’t mean using a mutable hash table is “bad”.

I don’t even know what “functional programming” means.
If functional programming means no side-effects, then why is there a term “purely functional”? Doesn’t that imply that regular functional programming is usually not “pure”?
My favorite view of functional programming is a style where we strive to write functions that are mathematically functional (same input => same output). This view allows us to have some degrees of side effect in a function.

I’d say using higher-order functions is the most important part of functional programming, and it happens that higher order functions tend to be more useful when you give them functions without side effects