class A : Schematic<A> {
var i by int(min=12, max=24)
}
This is hard to read and problematic as we add more customisation features.
Future syntax:
class A : Schematic<A> {
var i by int {
constraint min 12 max 24
constraint validator { it % 2 == 1 }
attribute label "I"
attribute hint "Must be odd."
attribute doc "This is a number which must be greater than or equal to 12 and lesser than or equal to 24."
}
}
The current field definition syntax looks like:
This is hard to read and problematic as we add more customisation features.
Future syntax: