lilypond-devel
[Top][All Lists]
Advanced

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

Re: preliminary GLISS discussions


From: David Kastrup
Subject: Re: preliminary GLISS discussions
Date: Tue, 04 Sep 2012 17:59:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Joe Neeman <address@hidden> writes:

> On Tue, Sep 4, 2012 at 1:00 AM, David Kastrup <address@hidden> wrote:
>     
>     The argument list as such would require delimiting to make this
>     work independently from advance knowledge about the number of
>     elements.  Which gets us to Scheme syntax. The enthusiasm of
>     people about this kind of fully delimited syntax is about on par
>     with the enthusiasm about writing XML files manually.
>     
>     Also the type of an argument is not necessarily known without
>     consulting
>     the function signature. As a silly example, try
>     
>     var = \relative c'-3
>     
>     \void\displayLilyMusic \var
>     
>     Try guessing its output before running it. Find an explanation.
>     Replace \displayLilyMusic with \displayMusic and corroborate your
>     explanation.
>
> Isn't this an argument for delimiting the argument list? If you don't
> expect anyone to guess where it begins and ends correctly (and I didn't)
> , doesn't that mean we should have a more explicit syntax?

I consider it a matter of freedom of expression, and with freedom comes
responsibility.  C/C++ have a cascade of dozens of operator priorities
in spite of having parens.  Scheme is fully delimited, and simple.
Every program is, unevaluated, a data structure in print form, uniquely
determined.

For any language for which one can just agglomerate elements into larger
expressions without explicit delimiters, you'll get corner cases which
are hard to read and a bad idea to write.  We don't pick a syntax
because of being able to write or not being able to write badly
understandable code.  We pick it because of being able to write or not
being able to write well understandable code.

For languages like C++, you get a lot of "the parser must be able to
distinguish" pairs that are either function calls or declarations.  You
don't get that for Scheme.  Does that mean that any Scheme program is
better readable than a well-written C++ program?  No.

We pick LilyPond as a language for music descriptions because of being
able to write good approximations to what we want.

-- 
David Kastrup



reply via email to

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