lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scheme coding style


From: Simon Albrecht
Subject: Re: Scheme coding style
Date: Fri, 29 May 2015 23:11:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Am 29.05.2015 um 22:25 schrieb Carl Sorensen:

On 5/29/15 1:25 PM, "Simon Albrecht" <address@hidden> wrote:

Hello,

a while ago I found this document on what appear to be very widely
accepted standards for formatting scheme code:
<http://community.schemewiki.org/?scheme-style>. I find it very useful
and it seems to be altogether uncontroversial while warranting good
legibility.
Do we also accept these guidelines in our use of scheme?
Yes, we accept these guidelines.  But outside of .scm files, we don't
enforce them.

Last time I checked, our official standard of Scheme style was "whatever
Emacs creates".
Which is pretty much the same as suggested in the above-linked document, except for the line breaks, which aren’t automatically inflected, are they? I don’t use Emacs.

We have a script that gets close in creating approved style, but it never
got officially adopted.


If yes, we
should consider documenting them, or rather, referencing them in our
docs. This could be
­ in the usage manual
<http://lilypond.org/doc/v2.19/Documentation/usage/general-suggestions>,
where the corresponding Lilypond coding recommendations are found.
I would be happy with a reference there.

­ in the scheme tutorial
<http://lilypond.org/doc/v2.19/Documentation/extending/scheme-tutorial>,
but where? Someone who is completely new to scheme will not make much
use of style instructions.
It seems like a reference in the Scheme tutorial would also be
appropriate. (Perhaps a reference to the usage manual, rather than a
restatement of whatever is in Usage.
­ the Learning Manual would be best for propagating their use, but that
doesn¹t actually introduce scheme, does it? (thinking aloudŠ)
I don't think we need to propagate their use in .ly  files.  I also think
we should *not* introduce Scheme in the Learning Manual.  Lilypond is hard
enough without the scheme layer.
Of course.

My reason to raise the topic is the amount of badly formatted, hard-to-read code out there. So I think we should find a prominent place where _every_ Lilypond user will come across style guidelines for both Lilypond and Scheme code. But IIRC a restructuring of the manuals overview page is in the making or planned anyway? It’s a different issue with Lilypond code, since it is much more complicated and diverse (on the surface) than Scheme code and some things will always depend on the music and on individual taste. So prior to the GLISS there won’t be a definitive solution for documenting guidelines, but as a start it’s good to have references for scheme style in Usage and Extending.

Regards, Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]