When defining a type, is it possible to place a constraint on parameter values? For example, consider the following simple type definition:
struct Orf
start::Int32
stop::Int32
pol::Int8
end
Is there any way to add a hint such as "stop > start"
to this definition? In pseudo-code, it might resemble
struct Orf
start::Int32
stop::Int32, start > start
pol::Int8
end
In this way, data errors could be caught without explicit tests in code.
3 posts - 2 participants