[vodml] EnumLiterals and vodml-id

Markus Demleitner msdemlei at ari.uni-heidelberg.de
Mon Jan 11 10:33:10 CET 2016


Hi DM,

On Sun, Jan 10, 2016 at 01:14:46PM +0000, Gerard Lemson wrote:
> I think one obvious solution might be to add a 'fullName' attribute
> (or 'title'? I'd be open to alternative name) to EnumLiteral that

I guess it'd be "title" for me if I had to choose.  But what use
would it be (i.e., how is Software expected to use this title)?

> The other, more straightforward solution is to restrict
> enumliterals to the pattern for VODMLName.
> I actually slightly prefer this solution and not only because it is
> simpler. Enumerations are primitive types with a discrete set of

With the caveat that I have no implementation experience here (and
the judge on gut feeling and conjecture), I'm fairly sure this is far
preferable; if those enums are going to be mapped to enums in
languages that have them, the literals must follow these languages'
identifier rules.  Since neither LISP nor FORTH are the mainstream
languages we target, we had better have a restrictive pattern that
actually works with identifiers in C, Java and Python.  Which happens
to be what this alternative does.

Perfect with me.

Cheers,

       Markus


More information about the dm mailing list