2 ms·
Thanks. I went through all of the learn.adacore.com stuff, but it was like 18 months ago.
by steveklabnik 6y ago
Thanks. I went through all of the learn.adacore.com stuff, but it was like 18 months ago.
- johnisgood 6y agoYou know what? You might be even able to implement this in Rust! index = num(-1->1000); or something. :D I dunno how attributes would work, but man, they really are handy. It is very, very difficult to shoot yourself in the foot.
- steveklabnik 6y agoRust's "associated constants" are a very similar feature. You can also do runtime checked ranged integer types, and compile-time checked ones, though that's very awkward at the moment. It'll get un-awkward at some point; an implementation of the feature needed is in nightly.