lilypond-user
[Top][All Lists]
Advanced

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

Re: Discuss signature for new function \annotate (new version)


From: Urs Liska
Subject: Re: Discuss signature for new function \annotate (new version)
Date: Wed, 12 Jun 2013 15:13:31 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

On 06/12/2013 02:50 PM, Tim Slattery wrote:
Thomas Morley <address@hidden> wrote:


Once I did a first step into C++
The common "hello world"
I had to _compile_ it to make it work.
That makes a great difference for usability in LilyPond.
I've been programming for over forty years, so I know something about
it. Yes, you had to compile your C++ code to make a standalone
program. If you made a standalone program with Scheme you'd probably
have to do the same. Lilypond includes an interpreter for Scheme. Web
browsers include interpreters for Javascript, so you don't have a
separate compile step there.

So called "scripting languages" like Perl, Ruby, Python, etc have to
be run through their interpreters. That is, you can't just have the
Perl program on your machine, you also have to have the Perl
interpreter. Your compiled C++ program can be run on a computer that
does not have a C++ compiler installed. Both approaches have
advantages and disadvantages.

That's what I'm feeling too from a different perspective.
LISP is being characterized here as being a superior language because it is a natural way to give instructions to the computer.
No added layer of complexity added to bother the interpreter.
That is because the burden of modeling the world and boiling it down to executable steps is shifted toward the programmer.

But (depending on the task) it is equally valid to think of a programming language as a medium that should be a natural way for the programmer to express what the computer is supposed to do. Breaking down these tasks to executable steps is then the duty of the interpreter/compiler. Of course such a language is more complex, and of course it is less efficient because the machine will do that in a more schematic way than a human could (but not necessarily does).

Compared to writing Scheme writing Python almost feels like writing plain English. And that is a good thing. Appreciating that doesn't mean being lazy or getting too comfortable.
Scheme is simple because it's nearly atomic.
Understanding Scheme is difficult because one has to build the world from these atoms oneself. And you have to think like the calculator you're instructing. This is much further from the way humans think than other languages. IMHO that's the reason why so many people stand puzzled before Scheme. You have to learn two interdependent things at once.

That said: From David's first longer explanation I can see what it is good for, and why it is a natural choice for integrating with LilyPond.

Urs



reply via email to

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