X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/828cb3b1dfaf0960c017093e7278429ea1b338fb..6390b8458f7d363a58c1d6fcb0723dc9eb61e68e:/STYLE diff --git a/STYLE b/STYLE index c138615..c1eb705 100644 --- a/STYLE +++ b/STYLE @@ -40,8 +40,8 @@ beyond ANSI Common Lisp and what's included in just about every serious implementation: specifically, MOP introspection, and Gray streams. There's intentionally no MOP intercession. -The frontend additionally ~cl-launch~, but the dependency is actually -quite weak, and it could be replaced with a different, maybe +The frontend additionally makes use of ~cl-launch~, but the dependency +is actually quite weak, and it could be replaced with a different, maybe implementation-specific, mechanism fairly easily. I'm keen to take patches which improve frontend portability. @@ -79,8 +79,8 @@ this. + Break a long nested calculation into pieces, giving names to the intermediate results, in a ~let*~ form. - + Hoist deeply nested complex computations out into an ~flet~ or - ~labels~, and then invoke it from inside whatever complicated + + Hoist deeply nested complex computations out into ~flet~ or + ~labels~, and then invoke them from inside whatever complicated conditional mess was needed to decide what to do. + Shrug my shoulders and let code dribble down the right hand side for @@ -133,11 +133,10 @@ package definition file. Then there's ~cl:in-package~. Like ~defpackage~, I use a gensym to name the package. I can't think offhand of a good reason to have a file with -sections `in' more than one package. So, in the ~in-package~ form goes -at the top of the file, before the first section header. If sections -are going to end up in separate packages, I think I'd put a -~cl:in-package~ at the top of each section in case I wanted to reorder -them. +sections `in' more than one package. So, the ~in-package~ form goes at +the top of the file, before the first section header. If sections are +going to end up in separate packages, I think I'd put a ~cl:in-package~ +at the top of each section in case I wanted to reorder them. The rest of the file consists of Lisp code. I don't use page boundaries ~^L~ to split files up. Instead, I use big banner comments for this: @@ -207,7 +206,7 @@ questions influence my decision. implementations aggressively optimize ~defstruct~ accessor functions. - + Have I subclasses my class? While I can move over a + + Have I subclassed my class? While I can move over a single-inheritance tree using ~:include~, it seems wrong to do this most of the time. Also, I'd be precluding subclasses from multiple inheritance, and I'd either have to prohibit subclassing by