type conformance and best match
This is the current way to express conformance and best match.
TemplateCall(name, args, attrs, body): refers to best Template name of conformant type TemplateSort(argtypes) where args has type argtypes
The strategy hooks to implement these notions have not been defined yet.
Submitted by Danny Groenewegen on 8 March 2013 at 17:11
Issue Log
If best and conformant is left out, it uses the default strategies first match and property equality?
Doesn’t it always try to ‘conform’ to properties anyway? For example,
refers to Method of static True()
refers to a method that conforms to a value ofTrue()
for propertystatic
.
The standard conformance is equality. The idea was to have a generic strategy to hook-in user-defined conformance.
conformant
will tell NaBL to use the hook instead of equality. But you are right, this can be done always without the extra keyword. If the hook-in is not defined, we can fall back to equality.
best
is needed for disambiguation. But again, there can be a generic disambiguation hook which falls back to identity.
Added the hooks to the runtime-library: nabl-property-eq(|kind) for property conformance and nabl-disambiguate(|namespace) for selecting the best definition.
Log in to post comments