[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lilypond-auto] Issue 3907 in lilypond: Patch: Moves the Box class t
From: |
lilypond |
Subject: |
Re: [Lilypond-auto] Issue 3907 in lilypond: Patch: Moves the Box class to flower/ in a new class called FlowerBox. Wraps FlowerBox as Box smob in lily/ |
Date: |
Mon, 28 Apr 2014 08:20:23 +0000 |
Comment #5 on issue 3907 by address@hidden: Patch: Moves the Box class to
flower/ in a new class called FlowerBox. Wraps FlowerBox as Box smob in
lily/
http://code.google.com/p/lilypond/issues/detail?id=3907
The problem is one of scale and of processing. C++ manages memory in a
different manner from Scheme. Something like
Skyline xxx()
{
Skyline z;
[lots of stuff filling z with data]
return z;
}
requires a lot of copying effort because the life time of data structures,
including complex ones, is tied to the scope where it is created. You can
pass back pointers instead and allocate variables on the heap, but then you
need to keep track of when to release the associated memory manually: C++
will not feel responsible for tracking the life time of the value then.
C++11 tries adding stuff into the language like "move semantics" and
associated operators in order to get a bit more control over this. The
resulting complexity of code is flabbergasting.
In contrast, in Scheme the life time of a data structure is tied to the
time where references to it disappear. One does not usually create copies
unless one plans on modifying them.
At the current point of time, Skylines are more or less opaque structures
that one cannot sensibly access from Scheme. That means that LilyPond
users cannot actually do any skyline manipulations themselves.
You are proposing cementing this shortcoming so that only _non_-LilyPond
users will be able to access skyline elements sensibly/efficiently even in
future.
That's the wrong direction to take. And it has no place in the LilyPond
code base. If you want to develop a fork of the flower library for some
different endeavor (and I don't think it is a really convincing base for
that), the place to do that is not the repository of LilyPond.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
- [Lilypond-auto] Issue 3907 in lilypond: Patch: Moves the Box class to flower/ in a new class called FlowerBox. Wraps FlowerBox as Box smob in lily/, lilypond, 2014/04/28
- Re: [Lilypond-auto] Issue 3907 in lilypond: Patch: Moves the Box class to flower/ in a new class called FlowerBox. Wraps FlowerBox as Box smob in lily/, lilypond, 2014/04/28
- Re: [Lilypond-auto] Issue 3907 in lilypond: Patch: Moves the Box class to flower/ in a new class called FlowerBox. Wraps FlowerBox as Box smob in lily/, lilypond, 2014/04/28
- Re: [Lilypond-auto] Issue 3907 in lilypond: Patch: Moves the Box class to flower/ in a new class called FlowerBox. Wraps FlowerBox as Box smob in lily/, lilypond, 2014/04/28
- Re: [Lilypond-auto] Issue 3907 in lilypond: Patch: Moves the Box class to flower/ in a new class called FlowerBox. Wraps FlowerBox as Box smob in lily/, lilypond, 2014/04/28
- Re: [Lilypond-auto] Issue 3907 in lilypond: Patch: Moves the Box class to flower/ in a new class called FlowerBox. Wraps FlowerBox as Box smob in lily/,
lilypond <=
- Re: [Lilypond-auto] Issue 3907 in lilypond: Patch: Moves the Box class to flower/ in a new class called FlowerBox. Wraps FlowerBox as Box smob in lily/, lilypond, 2014/04/28
- Re: [Lilypond-auto] Issue 3907 in lilypond: Patch: Moves the Box class to flower/ in a new class called FlowerBox. Wraps FlowerBox as Box smob in lily/, lilypond, 2014/04/28
- Re: [Lilypond-auto] Issue 3907 in lilypond: Patch: Moves the Box class to flower/ in a new class called FlowerBox. Wraps FlowerBox as Box smob in lily/, lilypond, 2014/04/28