3 ms·
>the superb racket/class encapsulation mechanism. Superb? The racket class system strikes me as awful/embarrassing. The language at least looks functional in
by flyinRyan 14y ago
>the superb racket/class encapsulation mechanism.
Superb? The racket class system strikes me as awful/embarrassing. The language at least looks functional in nature, but to do OO they implemented this ridiculous single dispatch mechanism (manually calling "send" no less!). Why on earth didn't Racket end up with a CLOS like system? They could have made anything they wanted, and yet they ended up with a system that will require people to write the Visitor pattern. Shocking.
- _sh 14y agoAlthough it looks impoverished, it's really just a foundation for developing your own abstractions, and syntactic sugar goes a long way (I've bound the Alt-> key to → and use it for 'send'). CLOS-like systems can be built on structs with the racket/generic module and Typed Racket makes multimethods trivial.