
For one, the set of match patterns aren’t fixed. With define-match-expander
users can define their own patterns.

TR runs after macro expansion though, so arguably the difficulty is not about that

I would guess (in a completely uninformed way) that the matching in Racket is too flexible to allow for easy exhaustiveness checking. As in, match
is not sufficiently constrained for it to be easy to determine whether a match may be exhaustive in any given case. The trade-off being that it makes things easier for programmers in other situations.

The ‘reader layer’ is lexer/parser.

E.g. in @ben ‘s #lang forth
https://github.com/bennn/forth/blob/master/private/command.rkt\|https://github.com/bennn/forth/blob/master/private/command.rkt implements Forth command parsing & execution.
Ben explains it better in the README https://github.com/bennn/forth\|https://github.com/bennn/forth


How do I type λ in Dr. Racket (mac OS)

I think tap escape, then shift+L

Yes, that does it. Thanks! (the most important letter in the alphabet :slightly_smiling_face:)

On Mac, cmd
+\
also works. I think on other platforms it’s ctrl
+\

Yes, this is in fact the best option for what I’m doing (https://cs.uwaterloo.ca/~plragde/flane/LACI/Propositional_Logic.html)


Yes. BTW BR is worth paying for https://beautifulracket.com/how-to-pay.html\|https://beautifulracket.com/how-to-pay.html

What other people have said is part of it. Match is very flexible, so you can embed arbitrary predicates.

Also, the layers go the wrong way: type checking happens after match is compiled away, so match can’t use type information to check things.