Hi all,
I've been using Common Lisp for about a year so I'm still a relative newbie. My question is CLOS related. Up until now, I've used structures (through defstruct) heavily but I'm starting to substitute CLOS classes in for structs in certain places. I like the flexibility that CLOS gives me.
However, something that I like about structs is that they can easily be printed in a way that the reader can read them back in. This makes it easy to do simple archival of objects in plain text files. I've noticed recently that CLOS objects do not seem to be printable in the same way (they print with the funky #<> unreadable syntax). Is there any easy way to print CLOS objects in a way that they can be read back in easily?
I won't really need to use multiple inheritance in the near future so maybe structs would be good enough (using single inheritance). I know you can even define generic methods based on struct types. Should I just stick with structs? Should I start using CLOS and roll my own methods for reading and writing objects (or is there some easy way to do it)?
Regards,
Justin
