www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Zig talk on youtube (mentions D briefly)

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 

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
Apr 15 2018