Template type implementation #49
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently Pocomath implements the base (say
Tuple
) of a template type (likeTuple<T>
) as its own separate type (which is intended not to really be much used, it's just there for type deduction, although one can allow functions that can operate generically on Tuples without needing any information about the element types, likelength
, to take arguments of typeTuple
).In retrospect, it seems to me this added an unecessary wrinkle, and that things would be more straightforward (and some code would be saved) if templates were strictly templates, with no "base" type. Then if the infrastructure needs a place to hang "backstop" implementations that catch uninstantiated templates (for example if it remains built on top of typed-function, rather than integrated into it), it can simply instantiate e.g.,
Tuple<any>
for that purpose.Design Note: template type implementationto Template type implementationPR #53 switched to the suggested system internally, using a second typed universe of "catchall" implementations, rather than instantiations like
Typed<any>
.