Hi all,

At the moment we're representing revision lists as regular lists like:

  ("archive" "category" "branch" "version" "revision")

and we have accessor functions like tla-archive-name, tla-category-name
etc. to access these.

I'm a big fan of this approach (defining accessors that interact with
the underlying data representation instead of accessing it directly),
but in quite a few places in the code we've got things like:

        (tla-sync-tree (apply 'tla-name-construct-fully-qualified
                              (if arg (butlast full) full))
                       to-tree)

I think I probably wrote this.  Here I had a revision and wanted to chop
off the revision part and construct a string like
"archive/category--branch--version".  Obviously this wouldn't work if
"full" (the revision) had been represented as a struct instead of a
list.  Unfortunately because Lisp is really good at working with lists,
representing our revisions as lists can make it *really* tempting to use
builtin list functions instead of defining our own accessor-type ones,
so there are quite a few places in the code where we've assumed that
revisions are represented as lists and used things like apply, butlast,
etc. to work with them.

I'm not suggesting that this is an urgent issue... I'm really just
curious and thought I'd see if I could generate some discussion on this
;o)  Does anyone else have an opinion on this sort of thing?

Cheers,

Mark

-- 
Mark Triggs
<[EMAIL PROTECTED]>


Reply via email to