Christian Ohler <[EMAIL PROTECTED]> writes: > (defstruct dvc-status-entry ...) > (defstruct (dvc-status-file-entry (:include dvc-status-entry)) ...) > (defstruct (dvc-status-dir-entry (:include dvc-status-entry)) ...) > (defstruct (dvc-status-message-entry (:include dvc-status-entry)) ...) > > This is untested. But something like it should work, and I think it's > a good solution. > > You could then use `etypecase' to discriminate between the different types.
Ah. That's what I need. I did not consider that cl would provide type inheritance. And it's still just macros, so I can use it in the DVC front-end :). > A less structured, more traditional Lisp-style representation would be > a list with the tag in its car. Discriminate using (ecase (car ...)), That's what I started using. > and use destructuring-bind inside each ecase branch to access the > fields (in xmtn, `xmtn-match' is a simple way to combine the > discrimination and destructuring). I'll look at that more closely. -- -- Stephe _______________________________________________ Dvc-dev mailing list [email protected] https://mail.gna.org/listinfo/dvc-dev
