soegaard2
2022-7-9 08:55:24

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


sorawee
2022-7-9 09:27:43

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


jcoo092
2022-7-9 09:39:30

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.


spdegabrielle
2022-7-9 10:38:00

The ‘reader layer’ is lexer/parser.




jxxcarlson
2022-7-9 11:01:25

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


spdegabrielle
2022-7-9 11:02:22

I think tap escape, then shift+L


jxxcarlson
2022-7-9 11:03:13

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


sorawee
2022-7-9 11:05:09

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


jxxcarlson
2022-7-9 11:07:55

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



spdegabrielle
2022-7-9 12:52:24

samth
2022-7-9 19:58:32

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


samth
2022-7-9 19:59:17

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.