5 ms·
>Nim also has benefits like Ada's range types Are Ada's range types similar to D's, or quite different? https://dlang.org/phobos/std_range.html https://dlang.
by vram22 10y ago
>Nim also has benefits like Ada's range types
Are Ada's range types similar to D's, or quite different?
https://dlang.org/phobos/std_range.html https://dlang.org/phobos/std_range.html
The above page links to the one below - the one below is about the concepts, by Andrei Alexandrescu (who joined Walter Bright in developing D).
http://www.informit.com/articles/printerfriendly/1407357 http://www.informit.com/articles/printerfriendly/1407357
- progman 10y agoI know Ada not D. Nim's subrange are close to Ada. If you define a type t1 = range [5..20] and you assign a value of 1 to a variable of type t1 then you get a compilation or runtime error.
- vram22 10y agoAh, then that is similar to Pascal too, from its early versions, IIRC, not just Turbo Pascal onwards.