lilypond-user
[Top][All Lists]
Advanced

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

Re: Naming RFC: Properties, property sets, presets


From: Carl Sorensen
Subject: Re: Naming RFC: Properties, property sets, presets
Date: Sun, 12 Jul 2020 21:39:49 -0600



On Sun, Jul 12, 2020 at 8:40 PM Andrew Bernard <andrew.bernard@gmail.com> wrote:
I think a profile is a complete list of settings/properties.
Maybe it's a "configuration", then.

Or a "setting" (instead of a preset).

One can think of taking the default profile, and changing it by applying a setting, or a configuration.  This would imply, of course, that a setting can affect multiple properties, which is a little bit strange.  But I don't think there is an issue with a configuration affecting multiple properties.

Override would be a good word, but we already use override in lilypond.  I don't think we want to have two different meanings for the word override.  Currently it is a verb meaning "change the properties of all affected objects from this time forward".  In this new use it's a noun meaning "a collection of property settings to be applied".  Two meanings for the same word is problematic, IMO.

It would be nice to use "style", to be consistent with CSS.  But that breaks down because we have a style property for lines and noteheads.  And this seems like a little bit too narrow a concept to use the word "stylesheet".

Running through a thesaurus, I came across the word "trait".  It may not be clear enough.  But consider that traits are generally considered to be inheritable in at least one common usage of the term.  Traits are also observable characteristics of a person or thing.

\defineTrait \with {
  thickness = 3
  Y-position = 2
} my-function.appearance default

\defineTrait \with {
  parent = default
  color = #green
} my-function.appearance style-one

\defineTrait \with {
  parent = default
  color = #magenta
} my-function.appearance style-two

Using it the properties included in the trait are used while others
keep the current global value. Additionally arbitrary properties can be
overridden locally:

{
  \myFunction \with {
    trait = style-two
    label = "Foo"
    thickness = 2 % properties from traits can be overridden too
  } c'
}

I'm not sure I like it yet, but I think it's better than "style" or "override".  And probably better than "preset" .  But I'm not opposed to using "preset" if nothing else is proposed that jumps out at you.

"quality" is also a possibility.  Often when we consider quality, we consider lots of characteristics.

\defineQuality \with {
  parent = default
  color = #magenta
} my-function.appearance style-two

{
  \myFunction \with {
    quality = style-two
    label = "Foo"
    thickness = 2 % properties from traits can be overridden too
  }


With a nod to particle physics, we might want to consider the word "flavor", which is used to distinguish particles such as quarks as a collection of properties.  

\defineFlavor \with {
  parent = default
  color = #magenta
} my-function.appearance style-two

{
  \myFunction \with {
    flavor = style-two
    label = "Foo"
    thickness = 2 % properties from traits can be overridden too
  }

After considering all of these ideas...

Maybe just stick with preset.

Carl


reply via email to

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