Am Do., 27. Aug. 2020 um 02:45 Uhr schrieb Felix Thibault <xxxxxx@gmail.com>:
I haven't been able to to get that example to work [I did put the define inside the begin and add test as an rtd in the last expression],

I have just written my example directly in the email, so probably not all parentheses are correct.
 
but it did occur to me that if what you want is to use the getters instead of the names, you can already do that with fields:

(define <posn> (make-posn x y) posn? (x posn-x) (y posn-y))
(match (make-posn 3 4)
       ((and (= posn-x x) (= posn-y y)) (sqrt (+ (* x x) (* y y)))))

That is a good practical solution. But I am more concerned about the specification of "object" in a system that does the right thing and has "hygienic" field names, e.g. where field names are (possibly macro-renamed) identifiers and not just symbols.

In these implementations, calling "slot-ref" with a symbol also doesn't make sense.