lilypond-user
[Top][All Lists]
Advanced

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

Re: Appreciation / Financial support


From: Han-Wen Nienhuys
Subject: Re: Appreciation / Financial support
Date: Tue, 29 May 2012 22:12:37 -0300

On Tue, May 29, 2012 at 2:08 PM, Janek Warchoł <address@hidden> wrote:
> On Tue, May 29, 2012 at 6:04 PM, David Kastrup <address@hidden> wrote:
>> Han-Wen Nienhuys <address@hidden> writes:
>>> While the scheme integration have been a big leap forward in terms of
>>> expandability and flexibility, I think it has also been our gravest
>>> design error. Both for technical reasons (GUILE is a poor
>>> implementation), but also for practical reasons: writing scheme is
>>> hard for the general public, and it has surely decreased the amount of
>>> developer participation we've had.
>
> Interesting.  If you were deciding now, what language would you use?
>
> And is it at all conceivable to change this now?


One of the problems of LilyPond is that C++ had very poor support for
things we desperately need: reflection, automatic memory management
and callbacks.

if someone says \stemUp in a score, this has to translate into a
change somewhere internally, and if the Stem is a

  class Stem : Object {
    Direction dir_;
  }

then it requires a lot of boilerplate to automatically expose that C++
variable to the parser.  So, the properties moved into Scheme. Then
the callbacks moved there too, the object pointers, etc., and before
we knew, everything was a C++ and Scheme object.

As a consequence, GUILE is not only the language for writing
extensions, but it is the entire platform upon which LilyPond is built
internally too: almost every C++ data structure is manipulated and
passed on as a SCM variable as well, and there is little prospect of
ever being able to separate them.

If I would re-do it, I would do so in a language where you can write
have the data be inside native classes, and automate generating
methods (setters, getters) and hooks (property callbacks), such that
the core program wouldn't need to be aware of the scripting language.

Then you could make (multiple!) scripting language bindings against
those data, without having to integrate the language throughout.

I personally have become very enamored with Go (golang.org), btw.
Sometimes I wonder how LilyPond would turn out if I started it from
scratch today.

-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen



reply via email to

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