Skip to main content

Appendix B. Known deviations

This appendix lists the places where the 3.0 implementation does not do what the language, as specified in the chapters above, is meant to do. Each entry is a defect of the implementation: a conforming program does not depend on it, and a future release may change it. The identifiers are those of KNOWN_DEFECTS.md, which holds the symptom, the reproduction and the analysis of each.

Many of these deviations fail silently: the program parses, loads, runs, and gives a wrong value. Since 3.0 (CORE-F-11), those that leave a binding unresolved fail when they run instead of giving null. They are the reason why chapter 13 insists on validation and on asserting values.

B.1 Statements and expressions​

IdDeviationSpecified inWrite instead
CORE-D-19a method call on a string literal does not resolve: an error at run time§9.5.2put the literal in a variable
CORE-D-85a failure caught by a try in a getter read outside a behaviour is still reported§8.10write the try in a behaviour

B.2 Properties and behaviours​

IdDeviationSpecified inWrite instead
CORE-D-3in set(T x) { … } the value is always named value; the declared name is ignored§6.7declare it value
CORE-D-11an expression property that has been read can keep its earlier value§6.4read the underlying value in a behaviour
CORE-D-4a default value of an argument does not let a call omit it§7.2pass every argument; add a named creation scheme
CORE-D-13new C::name() with fewer arguments than the scheme declares does not resolve; a call must match in number§7.4pass the arguments
CORE-D-17super.name() does not resolve when the concept has several parents: an error at run time§5.3.2a helper behaviour called on this
CORE-D-10delete x does not remove x from the multi-valued properties that hold it§10.4remove, then delete
CORE-D-74the initializer of a property that also has a with clause is lost on save§6.2initialize it in the creation scheme
CORE-D-73a creation run by a technology action, or through a technology factory, hides a failing creation scheme§13.6assert the effects of the creation
CORE-D-49signatures compare parameter names, not types; the first assignable overload wins; override return types and inherited abstract behaviours are not checked§5.3.1, §7.4distinct names for overloads; most specific first
CORE-D-55an inherited event listener is called twice after its instance is loaded§7.7declare the listener in the concrete concept

B.3 Matching and queries​

IdDeviationSpecified inWrite instead
CORE-D-1the implicit matching set of a behaviour is typed by its first match§10.9.4one explicit set per concept
CORE-D-12the where of begin match is ignored: end match … delete() deletes the instances it meant to leave out, even if the match loop skips them§10.9.5end match … delete() only on every instance of the concept; otherwise no end match, explicit deletion
CORE-D-53select from a concept instance misses the instances nested more than one level down§10.2query from the virtual model instance
CORE-D-54the list returned by an unfiltered select is the internal index: modifying it hides instances§10.2never modify a select result; copy it

B.4 Types, names and loading​

IdDeviationSpecified inWrite instead
CORE-D-5a concept type with an empty URI is reported as resolved§4.8—
CORE-D-16a namespace alias is not resolved in an annotation§3.3, §11.3write the full address in @URI
CORE-D-34loading units that import each other logs transient Unresolved type warnings§3.8none: ignore the transient ones
CORE-D-33the text rebuilt from the model is not always the text that was parsed§1.1—
CORE-D-56a control statement whose body has no braces is saved with braces and a broken indentation§8.1brace the bodies

B.5 Scripts​

IdDeviationSpecified inWrite instead
CORE-D-20after a second assignment, a script variable reads as null§12.7a new name for each value

B.6 Behaviours of the language that are not defects​

Some behaviours surprise a reader who comes from Java but are what the language specifies. They are collected here for convenience.

BehaviourSection
/ and % give decimals, even between integers§9.5.1
a string is never converted to a number; 1 + "a" is an error§9.5.2
a behaviour of the same instance is called on this§7.4
a missing import is reported by validation only; a path through it is an error at run time§3.5.2
an unassigned primitive property holds null, not 0§4.2
[2,8] and other bounds are read as [0,*] with a warning§4.6
a type version @(1.2) is accepted and ignored§4.5
a concept instance exposes only its properties and behaviours to a path§9.6.2
an all-capitals word is a constant identifier, not a type name§2.4
a misspelled annotation is kept and does nothing§11.2