Beginner (11yo) query on language making: https://groups.google.com/d/msg/racket-users/-vmG_1nZBHY/UqGO5xcwCgAJ
I’m posting this here because Connie doesn’t seem comfortable posting on racket-users herself. (I don’t know the reason so I took out her email and sent her the link above so she can receive any responses)
I notice that opening waffle
, uncommenting #;(command-line
and running will give you a repl. It does disable the other stuff.
Thanks I’ve passed it on
See mail for a repl that works with the other command line stuff.
This function is really useful writing tests for macros: https://docs.racket-lang.org/syntax/macro-testing.html?q=convert-#%28form._%28%28lib._syntax%2Fmacro-testing..rkt%29._convert-syntax-error%29%29. I wonder if 1) there are any other helpful libraries and functions for macro testing, 2) how to make those things more discoverable. For instance, why don’t we have a check-expand
or check-macro
or something in the rackunit library?
Another way of phrasing the above is: How do you like to develop complex macros?
I haven’t really needed to test macros, but if I did I would probably try to put all of the expander functions in a separate module and test them like normal functions. Then I’d (require (for-syntax my-expanders))
or some-such and do (define-syntax my-syntax my-syntax-expander)
. This works as long as you don’t use any functions/parameters that must only be run during expansion.