lilypond-auto
[Top][All Lists]
Advanced

[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: Mon, 28 Jul 2014 06:22:06 +0000


Comment #8 on issue 4032 by address@hidden: Patch: unsmob_pitch -> Pitch::unsmob and related
http://code.google.com/p/lilypond/issues/detail?id=4032

This particular patch does not yet use templates. Inheritance etc make it reasonably easy to automatically provide something like
Pitch::unsmob
for Pitch and other things derived from a Smob base class. Creating an unsmob_pitch, in contrast, requires lowercasing of identifiers and pasting tokens together. That's not something you can tell a compiler, and if that work has been done by some macro call DECLARE_UNSMOB (Pitch, pitch), you don't even have a chance to find the definition of unsmob_pitch with grep.

_Writing_ the code is probably on par, but debugging it, finding one's way around it, using standard tools and so on becomes harder.

It's not even related to templates/inheritance as such but rather about identifiers getting assembled in macros. And of course, macros are not confined syntactically, so you cannot judge their effects on syntax without expanding them.

So this is not really concerned with making it easier to write code, but rather with understanding it. This particular change requires writing more verbosely (just very slightly). It's an inconvenience, but a rather small one.

--
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



reply via email to

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