2 ms·
I write Scheme code as if it had ADTs, e.g. (match payment [('invoice address ) (foo address )] [('card card-details) (bar card-deta
by chriswarbo 8y ago
I write Scheme code as if it had ADTs, e.g.
(match payment
[('invoice address ) (foo address )]
[('card card-details) (bar card-details)])
As you say, there's no exhaustiveness check; plus the language won't guarantee that the product types are adhered to. For example, someone might give us `('invoice card-details)` and the language wouldn't complain.
Racket's contract system can help with this; although it's very slow.