[Top][All Lists]

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

Re: bookparts

From: David Kastrup
Subject: Re: bookparts
Date: Tue, 06 Mar 2018 08:22:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Flaming Hakama by Elaine <address@hidden> writes:

> This is a bit confusing since it seems that
> you are saying 2 things:
>      1) If books have a scope of their own, [scopes of explicit books would
> be]
>     separate from the scope in the implicit book.
> This makes sense, since we'd expect the scopes of books,
> which are siblings, to be distinct.
> But, I don't think that the issue was to use definitions
> from one book in another book.   The issue was:
> how do I define variables within a book, to be used
> within that same book.
> However, I don't understand:
>     2) If books have a scope of their own,
> no "global" definitions would be visible in
> explicit books
> I'd rather expect that any book scope
> would be within the global scope,
> so anything defined globally
> would be available within each book.

"global scope" belongs to a book of its own.

>> Unfortunately, there does not appear to be a concept readily
>> consistent with scoping the current book/bookpart design.  Because
>> "scope" does not mean "you are defining the variable where you want
>> to use it".  A consequence of well-defined scopes is that you can
>> more often do it in that manner without impacting other code.  But I
>> haven't seen a good "well-definition" with LilyPond.  I am pretty
>> sure that people would protest books not getting to see definitions
>> made "outside" of them.  So normal books would have to be nested in
>> the implicit default book like bookparts of the implicit book are.
> This seems backwards from the discussion earlier,
> where the advice was to import your files with variables
> into the global space, not within the bookpart.

Well, it's nice to lead discussions utterly ignoring what LilyPond
actually does.  But they are not likely to lead to a tenable path

David Kastrup

reply via email to

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