on a scale of totally doable to basically impossib...
# announcements
h
on a scale of totally doable to basically impossible, how hard would it be for me to create a library that allows for defining variables to ranges using mathematical interval notation? e.g.
var b: Int in [-2,5.92) = 3
or even defining variables using set notation? e.g.
var attendee: Person in Invited = Carl
, meaning that either trying to set a value outside of the range either throws an exception or just sets it to the closest element, meaning even a variable defined in a set of random number elements like
Copy code
val y in { -5, 2.3, 0000.1 }
y = 3
println(y)
2.3