Zig talk on youtube (mentions D briefly)
Mark
smarksc at gmail.com
Sun Apr 15 20:41:17 UTC 2018
There was a talk recently by the creator of the Zig language [1].
Zig which was mentioned on the forums a few times.
The creator comes down really hard on languages with hidden
memory allocations. He emphasizes correct handling of memory
errors, particularly allocation fails. D is mentioned in the
context of languages that handle such errors using exceptions
(C++, C#, Java), which the creator doesn't like (one of the
principles of Zig is "no hidden control flow"). Strangely, Rust
isn't mentioned at all.
The compile-time features seem really nice. There are a lot of
similarities with D templates, but also some differences - In Zig
types are first class entities, so you can have functions taking
and returning types. For instance, A generic list would be
implemented as a (compile-time) function taking a type T and
returning a user-defined type List[T]. In practice it doesn't
seem that different from D templates but I thought it's a nice
way to think about generics.
[1] https://www.youtube.com/watch?v=Z4oYSByyRak
More information about the Digitalmars-d
mailing list