Back in December, I was hoping to write a new kind of type for Data::Record
, but have been struggling with illness and a lengthy wait for a doctor's appointment. Despite my main computer dying off a few weeks ago, I've been able to toy with this idea to some degree.
The post linked is rather heady. If the kind of type is class-based, then a type can typecheck as another merely by inheriting from another (or its pun). What I'm looking for out of such a HOW is static state. If I can shove an array of fields for a record type into its HOW, then its operators can generate an annotation, inherit from such a class describing its behaviour, embed their fields in their HOW, and return them, with the unique MOP for lists, tuples, and hashes becoming possible to implement with metamethods alone.
Rakudo's MOP plays it rather