1

This references says printable<%> should be implemented, and that it seems to be a wrapper around prop:custom-write.

https://docs.racket-lang.org/reference/objectprinting.html

But the docs for prop:custom-write say it's deprecated in favor of gen:custom-write.

Eroc
  • 147
  • 1
  • 1
    See: [_gen:custom-write for Racket classes_](https://stackoverflow.com/questions/54844089/gencustom-write-for-racket-classes). Don't worry too much about prop:custom-write being deprecated: it's just not necessary for "users" to use because `gen:custom-write` and `printable<%>` both exist as a replacement interface – Alex Knauth Jul 02 '19 at 15:29

1 Answers1

1

If you are using the Racket class and object system, then implement printable<%>. If you are using structs, then use gen:custom-write.

Sorawee Porncharoenwase
  • 6,305
  • 1
  • 14
  • 28
soegaard
  • 30,661
  • 4
  • 57
  • 106