Suggestion to remove Element from BUILTIN types in moddle


thanks for the moddle library, I try to use it in a project. Unfortunately, some
of the tests fail because moddle defines a built-in type ‘Element’ and the model
I want to implement (UML) uses an equaly named type as the root of its
inheritance hierarchy. This results in an incomplete descriptor, where
‘uml:Element’ is missing.

Besides from my use case, I don’t understand why Element is a built-in type. In
contrast to the other four types (String, Boolean, Integer and Real) Element
does not have any semantics or meaning and is not what I would call a basic data
type. It should better be defined in the context of a specific domain (imho).

I can see a value in the definiton of some fundamental data types. But the
implementation lacks a namespace to allow proper seperation.

Even though the removal might raise issues with existing implementations, the
resulting compatibility problems can be fixed by simply adding Element to the
model. On the other hand, I cannot find an easy workaround if a type with this
name is part of the model to be implemented, like in my use case.

Maybe I miss something and there is alread a way to avoid such type conflicts?


I’m not sure which way of collaboration you prefere. I created a branch for this
trivial change, but wanted to post here before creating a PR or issue.

Hi Frank,

Thank you for the detailed explanation. Can you please open an issue on GitHub for this? The repository is a proper place for such requests. Of course, you can link the blog post in the issue.



Ok, done.

1 Like