X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/1528431bae65721c81c5a3a1fd99b4231a936fe0..b8101b235df24885fe5152719ba4a94d214cdd47:/STYLE diff --git a/STYLE b/STYLE index 12e848a..c138615 100644 --- a/STYLE +++ b/STYLE @@ -4,10 +4,16 @@ Notes on Lisp style None of ANSI Common Lisp is off-limits. +I think my Lisp style is rather more imperative in flavour than most +modern Lisp programmers. It's probably closer to historical Lisp +practice in that regard, even though I wasn't writing Lisp back then. + I make extensive use of CLOS, and macros. On a couple of occasions I've made macros which use CLOS generic function dispatch to compute their expansions. The parser language is probably the best example of this in -the codebase. I like hairy ~format~ strings. +the codebase. + +I like hairy ~format~ strings. I've avoided hairy ~loop~ for the most part, not because I dislike it strongly but because others do and I don't find that it wins big enough @@ -217,7 +223,7 @@ making a new structure type. I tend to tidy up a few rough edges. + The default predicate always has ~-p~ appended. If the class name is a single word, then I'll explicitly name the predicate with a simple ~p~ suffix. For example, ~ship~ would have the predicate - ~shipp~, rather than ~ship-p~. + ~shipp~, rather than ~ship-p~. + If there are slots I can't default then I'll usually provide a BOA constructor which sets them from required parameters; other slots