On Saturday 25 February 2006 09.42, Nicolas Sceaux wrote: > May I nitpick about style?
Thanks! some of the mistakes were genuine while others were oversights due to laziness (some of the code is just a quick hack/proof-of-concept; I hope to replace it with better code sometime. E.g., primitive-eval was used because I forgot the name of apply) btw, do you know any good sources where I can learn about scheme coding style? > Erik Sandberg <[EMAIL PROTECTED]> writes: > > #(define (make-rel-music-function sig fun) > > (let ((newfun (lambda args > > (make-music 'SequentialMusic > > the indentation is broken here. My scheme code tends to generate very deep indentation, see below. > > The idomatic way of setting music properties is: > (set! (ly:music-property m 'elements) value) thanks (so music-set-property is just a legacy thing?) > > (let > > Usually, you don't skip a line after let. It was the only way I could stop Emacs from indenting it very deeply. Many of the newlines etc. were added for this reason; the indentation felt too deep. Do you know any nice general tricks, either to reduce indentation, or to make heavily indented code readable? > in srfi-1, first is synonym to > car. Ouch, I didn't know about that. Thanks. > > (if (and (<= pitch-diff 1) (>= pitch-diff -1)) > > (if (<= -1 pitch-diff 1) > > makes the relation clearer. Ah, nice. It's funny that lisp's "unintuitive" prefix operators is what makes it the first language I've seen which naturally expresses <= in a nice, readable way. -- Erik _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel