lilypond-devel
[Top][All Lists]
Advanced

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

Re: GOP2-4 - C++ and scheme indentation


From: David Kastrup
Subject: Re: GOP2-4 - C++ and scheme indentation
Date: Thu, 09 Aug 2012 13:08:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Graham Percival <address@hidden> writes:

> I do not have emacs installed.  I *WILL NOT* have Emacs installed.
> Carl has gone on record as saying that he will not use Emacs.
> IIRC Reinhold has also gone on record.  We could conduct a poll if
> you want to see other people who do not, and *WILL NOT*, install
> emacs just to format scheme code.
>
> Do you want to tell me (and them) that we shouldn't be editing
> .scm files in lilypond?

Scheme is a programming language which is close to impossible to
understand without consistent indentation, and to indent consistently
without support of a Scheme-aware editor.

This is not satisfactorily solved by first writing everything and
running an indenter afterwards.  You'll mess up the nesting levels and
your program will not work.

It does not matter whether your Scheme-aware editor is called Emacs.
Emacs has the advantage of also being LilyPond-aware, and being
Texinfo-aware, and C++-aware and navigating LilyPond documentation
including graphics about 10 times faster than any HTML browser.

Finding a good replacement for all those tasks is a challenge.

> I repeat: formatting source code is a computationally solved problem.

With LilyPond, not even _understanding_ source code is solved well.

> It is a complete waste of our incredible human creativity and
> intelligence to format stuff manually.

The purpose of formatting is _understanding_ the code.  Not meeting some
arbitrary rule set.  You need that while you write the code.  You can
postpone that mostly when writing C++ since its syntactic nesting is
much smaller than that of Scheme.

> I really don't see the objection.  Scheme is pretty easy to
> indent.  We almost have a working scheme file which indents
> scheme.  This will completely elminate one of the known stumbling
> blocks facing new contributors.  What's not to love?

The stumbling block is _writing_ the Scheme code, not submitting it.
When is the last time a code review complained about Scheme code
formatting?

-- 
David Kastrup




reply via email to

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