[LV2] #name as identifier
d at drobilla.net
Sat Sep 24 16:12:37 PDT 2016
On Mon, 2016-09-19 at 23:27 +0200, Robin Gareus wrote:
> On 09/19/2016 11:21 PM, Thomas Brand wrote:
> > Hi,
> > after a discussion on whether it can be useful to query properties by
> > name, i wondered about the authors' view on the following rephrasing
> > proposal of the LV2 specification for name
> > http://lv2plug.in/ns/lv2core/#name :
> > (additional text is enclosed like _new text_)
> > A display name for labeling in a user interface. Unlike lv2:symbol this is
> > unrestricted and may be translated. The lv2:name _is not necessarily
> > unique in the scope of the plugin definition and therefore_ MUST NOT be
> > used as a _unique_ identifier. This property is required for Ports, but
> > MUST NOT be used by the host for _unique_ port identification. The plugin
> > author may change the values of this property without changing the Plugin
> > URI.
> The proposed wording suggests that it may be OK to use name as
> non-unique identifier. IMHO it only adds confusion to the previously
> well written spec.
Labels (which is what this property should really be called) are not
identifiers, regardless of adjective. They aren't non-unique ones, they
aren't unique ones, they aren't strong ones, they aren't weak ones, they
aren't stable ones in any scope whatsoever no matter how narrow, etc.
Using a label as an identifier in any way whatsoever is wrong, period.
Any code that does so can and will break, and any such situation is, by
definition, the fault of whoever wrote that broken code.
This is true in general, though serializing/saving references to
plugins/etc by name/label/etc is especially egregious. Never, ever,
ever do this, ever.
There are numerous examples in the LAD world (and in general) of systems
giving themselves serious long-term problems by confusing these things
and not providing strong rules about canonical identifiers and the
restrictions thereof. LV2 very deliberately does not make this mistake,
and is explicitly clear about what is, and what is not, an identifier.
rdfs:label and lv2:name are very much not.
More information about the Devel