An instance of a given Z4/Type should be validated against the keys as defined in the given Z4/Type.
Description
Details
Event Timeline
Just a thought... Do we envisage a one-to-one relationship between Z4/Type and its Z4K3/validator, or can the same validator function be reused on multiple Z4/Types (which seems to imply a supertype, but perhaps we want to keep that concept implicit for now)?
I imagine you might re-use some of the sub-functions of the validators, e.g. the validator for the type Zn for floating point numbers will have a function checking that ZnK2 is a string that represents an IEEE double-precision float (or whatever), and that would also be useful for the type Zm for complex numbers on values ZmK2 and ZmK4 or whatever.
Hmmm... Thanks... I'd suppose sub-function re-use more at the Z5/Error level but, yes, if the Z4/Type is composite then its (singular) validator function might be no more than a composition of the validator functions of each of its component Z4/Types. Or it might be such a composition plus additional validation across the component types. There is some sort of parallelism there. What about different validator functions with the same Z14/Implementation (for the time being)? Does that say, "these types are different in theory but identical in practice"?
The Testers are going to be the inputs to the generic (system) validator for each of the Implementations of a given Function definition; certainly some Testers could theoretically be shared between different functions (trivial examples: [1,1 -> 1] would be a valid test for a multiply function and a bitwise AND function; [2,2 -> 4] would be valid for multiply and add; etc.), but it might be simpler to lock Testers to a specific Function.
Thanks for that, James. I may come back to this through T269182, but Happy Holidays in any event!
Change 659130 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/WikiLambda@master] tests: Add test suite for generic ZType re-use
Change 659131 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/WikiLambda@master] tests: Test creating a non-wiki type based on a non-wiki type
Change 659130 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] tests: Add test suite for generic ZType re-use
Change 659131 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] tests: Test creating a non-wiki type based on a non-wiki type
Change 674744 had a related patch set uploaded (by DVrandecic; author: DVrandecic):
[mediawiki/extensions/WikiLambda@master] Change the validator of Z4/Type to a validate function
Change 674744 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] Change the validator of Z4/Type to a validate function
Change 680426 had a related patch set uploaded (by DVrandecic; author: DVrandecic):
[mediawiki/extensions/WikiLambda@master] Moving all other builtin types from Z30 to their proper validator
Change 680426 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] Moving all other builtin types from Z30 to their proper validator