[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lilypond-auto] Issue 4032 in lilypond: Patch: unsmob_pitch -> Pitch
From: |
lilypond |
Subject: |
Re: [Lilypond-auto] Issue 4032 in lilypond: Patch: unsmob_pitch -> Pitch::unsmob and related |
Date: |
Sun, 27 Jul 2014 10:06:55 +0000 |
Updates:
Labels: -Type-Enhancement Type-Maintainability
Comment #2 on issue 4032 by address@hidden: Patch: unsmob_pitch ->
Pitch::unsmob and related
http://code.google.com/p/lilypond/issues/detail?id=4032
This is probably worth discussing. In this patch, only the unsmob_* calls
implemented with DECLARE_UNSMOB have been converted, basically because
those can be done "automatically" with the respective static member
function being declared elsewhere anyway.
Since the remaining unsmob_* calls are coded explicitly, they are more
visible to information extraction tools or IDEs. Nevertheless, obviously
they should be converted as well, for example unsmob_music -> Music::unsmob.
It would be nice not to have to use unsmob at all but rather a type
conversion/constructor, but since unsmob does not create a new object but
returns a pointer to an existing one, that seems tricky to pull off.
Naturally, the long-range aim is to get rid of all the macro folderol
surrounding smobs and use templates and inheritance instead.
I am working on that separately, with stuff looking quite doable overall.
It would be interesting to hear people's opinion regarding moving away from
the C preprocessor trickery.
It can conceivably lead to somewhat longer link times because of template
instantiation/etc and possibly problems with old compilers. But overall I
think we have more to gain than to lose by moving more into stock C++
rather than preprocessor magic coding.
--
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 4032 in lilypond: Patch: unsmob_pitch -> Pitch::unsmob and related, lilypond, 2014/07/27
- Re: [Lilypond-auto] Issue 4032 in lilypond: Patch: unsmob_pitch -> Pitch::unsmob and related, lilypond, 2014/07/27
- Re: [Lilypond-auto] Issue 4032 in lilypond: Patch: unsmob_pitch -> Pitch::unsmob and related,
lilypond <=
- Re: [Lilypond-auto] Issue 4032 in lilypond: Patch: unsmob_pitch -> Pitch::unsmob and related, lilypond, 2014/07/27
- Re: [Lilypond-auto] Issue 4032 in lilypond: Patch: unsmob_pitch -> Pitch::unsmob and related, lilypond, 2014/07/27
- Re: [Lilypond-auto] Issue 4032 in lilypond: Patch: unsmob_pitch -> Pitch::unsmob and related, lilypond, 2014/07/27
- Re: [Lilypond-auto] Issue 4032 in lilypond: Patch: unsmob_pitch -> Pitch::unsmob and related, lilypond, 2014/07/27
- Re: [Lilypond-auto] Issue 4032 in lilypond: Patch: unsmob_pitch -> Pitch::unsmob and related, lilypond, 2014/07/27
- Re: [Lilypond-auto] Issue 4032 in lilypond: Patch: unsmob_pitch -> Pitch::unsmob and related, lilypond, 2014/07/28
- Re: [Lilypond-auto] Issue 4032 in lilypond: Patch: unsmob_pitch -> Pitch::unsmob and related, lilypond, 2014/07/30
- Re: [Lilypond-auto] Issue 4032 in lilypond: Patch: unsmob_pitch -> Pitch::unsmob and related, lilypond, 2014/07/31