> On Mar 21, 2019, at 9:55 AM, Kees-Jochem Wehrmeijer <henc...@gmail.com> wrote:
> 
> It does? That sounds interesting. Do you have an example of that, or could 
> you point me to some docs? I thought object methods were called with send or 
> send-generic. 

Yes, you can attach generic interfaces to classes. Technique described here:

https://groups.google.com/d/msg/racket-users/uKPauoZvZQo/uey0a66HBgAJ 
<https://groups.google.com/d/msg/racket-users/uKPauoZvZQo/uey0a66HBgAJ>


> On Mar 22, 2019, at 3:34 AM, zeRusski <vladilen.ko...@gmail.com> wrote:
> 
> TBH I've been avoiding Racket object system since my needs are typically 
> limited and don't call for full blown OOP. I only casually looked at what its 
> capable of, I guess may need to revisit. I was rather hoping for something as 
> simple as structs and generics a-la Emacs Lisp. Superficially Racket structs 
> appear to be like those in Emacs Lisp and Clojure, but now that I'm using 
> them more I'm starting to doubt that. They feel lower level (although quite 
> rich) - the kind of cloth you use to build everything else.


My understanding is that Racket structs are comparatively more foundational 
(e.g., "_all_ values in Racket are structs" [2]), but for that reason, are 
comparatively more rigid. 

Furthermore, "classes and objects are implemented in terms of structure types." 
[3] So even though I am typically an OOP resister, I've come to think of 
Racket's class system as a friendlier way of working with Racket structs.

[2] https://groups.google.com/d/msg/racket-users/7rKKh088zEg/EeuJ3VbSBQAJ 
<https://groups.google.com/d/msg/racket-users/7rKKh088zEg/EeuJ3VbSBQAJ>

[3] https://docs.racket-lang.org/guide/define-struct.html 
<https://docs.racket-lang.org/guide/define-struct.html>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to