lilypond-user
[Top][All Lists]
Advanced

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

Re: [openlilylib] Rename 'snippet-' to 'module-'


From: Urs Liska
Subject: Re: [openlilylib] Rename 'snippet-' to 'module-'
Date: Sat, 19 Jul 2014 00:27:15 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Am 18.07.2014 15:51, schrieb Paul Morris:
Urs Liska wrote
Hi all openlilylib users,

when updating information on a few snippets (to test the documentation
generator) I think I realized something.

Currently we call the files we have ready for inclusion "snippets",
which is partially true but also a 'historic' thing.

But I think such a file can provide one of the following:

- one distinct object (e.g. function, shorthand, engraver, stylesheet)
    that is available after inclusion
- some functionality that is processed immediately on inclusion
- a number of objects (e.g. functions) that are made available
    through inclusion.

I think "snippet" doesn't match that list, and I suggest to rename it,
which would also make the library even more different from the LSR.

My suggestion is to think of the files as 'modules'. I think this is the
most consistent naming, also consistent with the use in programming
languages.
Say I "include the module 'git-commands'", then I have the contained
commands availabe from within the LilyPond input file. If I "include a
module 'stylesheets/henle/concert/piano'" the included stylesheets are
immediately applied.

I agree that snippet is probably not the best word here.  Module seems ok to
me, but what about just calling them "files"?  That fits with the existing
language of "including files".  It would avoid any potential confusion about
the difference between "including modules" vs "including files," which are
the same thing here.  Calling them modules might be taken to imply that
there's something special about these files that makes them modules, when
they're actually just files like any other LilyPond file.


I think that makes sense. On second thought I come to the conclusion that it's (only) an issue concerning the second aspect below.


Urs Liska wrote
This would imply changing the header field names from "snippet-title" to
"module-title" etc., meaning some more work when restructuring the
library. But I think it's worth the work.

What do you think?

I would suggest using "oll-" as the prefix for these header fields.
(oll-title, oll-tags, oll-author, etc.)  It's shorter and it decouples the
field names from what we're calling these things, whether snippets, modules,
files, etc.

Yes that's the perfect choice, I think, a prefix based on the library name, relieving us from making the function explicit. Which is good because we have files with quite diverse functions.

I've already renamed all "snippet-" instances to "oll-" in the program and in the three scripts that are present in the restructuring branch.

Best
Urs


Cheers,
-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/openlilylib-Rename-snippet-to-module-tp164591p164611.html
Sent from the User mailing list archive at Nabble.com.

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user





reply via email to

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