Domain-types update #1359
louthy
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Domain-types are still a relatively nascent idea for
v5that I am playing around with. I wouldn't use them in anger unless you're ok with updating your code when I change them. Because I will!Anyway, the updates are:
whereconstraintsDomainType<SELF, REPR>has a baseDomainType<SELF>. The derived domain types (Identifier,Locus,VectorSpace, andAmount) inherit fromDomainType<SELF>.REPRtype, simplifying the traits.DomainType<SELF, REPR>type as well as whatever derived domain type to gain a constructable value (see theLengthexample later)FrominDomainType<SELF, REPR>to return aFin<SELF. This allows for validation when constructing the domain-type.Lengthexample belowQuantitydomain-type for nowThis discussion was created from the release Domain-types update.
Beta Was this translation helpful? Give feedback.
All reactions