You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are builtins part of regular models or always assumed present?
When we export a model to a file (as we are doing in several scenarios) do we export the builtin primitives as well? Or do we leave them out and is any tool reading the file assumed to know them?
Pro part of export:
Self-contained JSON file
BUT: It's hard to make sense of the json content without specific LW knowledge
Pro always present:
Part of installation with special, stable ids
Versioned
Decision: We assume builtins are always present.
Do we declare builtins as language dependency?
If my language A uses anything of language B, A needs to depend onB.
If A uses anything of built-in, does it need to depend onBuiltin?
Any new language would need to declare the dependency before we can set e.g. a builtin property type
Decision: Don't need to declare
Do we declare builtins as used language?
Assume a JSON file that contains the M2 of language A. A refers to builtin entities like Node or String.
In the used languages section (#76), do we mention builtins?
Pro:
As builtins are used in M3, any M2 will probably instantiate builtins entities.
Thus, builtins is a used language.
NOTE: M1 JSON files might not have builtins as used language, e.g. if they don't contain any instance of INamed.
But, if they do (e.g. my language defines Person implements INamed, and my M1 contains an instance of Person), we do use builtins.
If my language B does not depend on builtin types, because I declare my SpecialSting and SpecialNumber types, I don't want to import builtins.
Con:
It's impossible to define a language without using builtins, so we can assume it to always be used.
Decision: builtins are handled like any other language on serialization level, i.e. MUST be listed as used language if instantiated anywhere in the serialization chunk.
The text was updated successfully, but these errors were encountered:
Are builtins part of regular models or always assumed present?
When we export a model to a file (as we are doing in several scenarios) do we export the builtin primitives as well? Or do we leave them out and is any tool reading the file assumed to know them?
Pro part of export:
BUT: It's hard to make sense of the json content without specific LW knowledge
Pro always present:
Decision: We assume builtins are always present.
Do we declare builtins as language dependency?
If my language A uses anything of language B, A needs to depend on B.
If A uses anything of built-in, does it need to depend on Builtin?
Pro:
Con:
Decision: Don't need to declare
Do we declare builtins as used language?
Assume a JSON file that contains the M2 of language A. A refers to builtin entities like
Node
orString
.In the used languages section (#76), do we mention builtins?
Pro:
Thus, builtins is a used language.
NOTE: M1 JSON files might not have builtins as used language, e.g. if they don't contain any instance of
INamed
.But, if they do (e.g. my language defines
Person implements INamed
, and my M1 contains an instance ofPerson
), we do use builtins.SpecialSting
andSpecialNumber
types, I don't want to import builtins.Con:
Decision: builtins are handled like any other language on serialization level, i.e. MUST be listed as used language if instantiated anywhere in the serialization chunk.
The text was updated successfully, but these errors were encountered: