Re:Ada: a C Developer's Perspective
by hashmal on Thursday April 27, 2017 @05:31AM
(#14210248)
first thing that comes to mind are bounds on integer subtypes. classic example is to declare an array to be indexed with such a type, then all out-of-bounds errors can be checked at compile time.
[ Parent
| on HN ]
GHC Haskell lets you implement that as a normal library: https://nikita-volkov.github.io/refined/
Hopefully Rust will get type-level numbers and stuff someday :)
Re:Ada: a C Developer's Perspective
by steveklabnik on Thursday April 27, 2017 @08:12AM
(#14210851)
See https://github.com/rust-lang/rfcs/pull/1931 and https://internals.rust-lang.org/t/lang-team-minutes-const-ge...
> We believe that we can have an RFC accepted and const generics available on nightly by the end of 2017. :tada: