Erik Sandberg <[EMAIL PROTECTED]> writes: > btw, do you know any good sources where I can learn about scheme coding style?
Usually, you learn scheme coding style by reading scheme books, or scheme code, but I don't know if there is a coding style document. Actually I don't know much of scheme coding style, as it's not my language of choice. I'm just adapting things from Common Lisp. >> 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?) Internally, (set! (ly:music-property music 'property) value) is changed to (ly:music-set-property! music 'property value). See the beginning of scm/music-functions.scm and make-procedure-with-setter in guile manual. >> > (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? Hm, I don't know. Skip an line just after a loong function name for instance, or use intermediate variables or auxiliary functions. But breaking the indentation really makes the code harder to read. >> > (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. I've often read that kind of comment, yes :-) nicolas _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel