Skip to content

How to use "DomainType<SELF, REPR>" with complex values #1358

Answered by louthy
HernanFAR asked this question in Q&A
Discussion options

You must be logged in to vote

Not sure if you've seen it yet, but the blog post that started off the domain-type traits is worth a read; it gives the motivation for the feature.

In my mind, domain-types and their derivatives AmountLike, IdentifierLike, LocusLike, QuantityLike, and VectorSpace are really about strongly-typing primitive-types like int, float, etc. The idea is to support a common set of features depending on the domain-type. So, for a database ID you might use IdentifierLike, for a typed length, you might use VectorSpace, etc.

I don't think it's necessarily wrong to have a domain-type that represents a tuple of values -- for complex numbers, or vectors, it would work well -- but, I think, for types that …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by HernanFAR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1357 on September 02, 2024 16:50.