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
-
Domain-types are still a relatively nascent idea for
v5
that 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:
where
constraintsDomainType<SELF, REPR>
has a baseDomainType<SELF>
. The derived domain types (Identifier
,Locus
,VectorSpace
, andAmount
) inherit fromDomainType<SELF>
.REPR
type, simplifying the traits.DomainType<SELF, REPR>
type as well as whatever derived domain type to gain a constructable value (see theLength
example later)From
inDomainType<SELF, REPR>
to return aFin<SELF
. This allows for validation when constructing the domain-type.Length
example belowQuantity
domain-type for nowThis discussion was created from the release Domain-types update.
Beta Was this translation helpful? Give feedback.
All reactions