News for hackers. Stuff that matters.
Re:Zig Performance Tracking Dashboard by cturtle on Monday December 06, 2021 @08:56AM (#29459748)
Zig is a general purpose language with no hidden control flow, powerful compile time metaprogramming, and easy cross-compilation and interop with C code.

For me it hits the sweet spot of fixing major problems in C, while staying small, consistent, and easy to fit the language inside my head unlike C++ or Rust. Also absolutely loving the compile time evaluation and type syntax.

Re:Zig Performance Tracking Dashboard by Calamitous on Monday December 06, 2021 @10:16AM (#29460697)
Interesting. I keep seeing marketing on “no hidden flow control”, but I’m curious what flow control is being hidden in other languages? Are they talking about exception handling?
Re:Zig Performance Tracking Dashboard by cturtle on Monday December 06, 2021 @12:17PM (#29462560)
Operator overloading, constructors, destructors, exceptions, etc. This page [0] is good for comparing Zig to other languages. And this [1] is a nice overview of the language.

One reason I think "no hidden control flow" is used so much when talking about Zig, is because Zig wants code to be easy to read, including understanding what is happening behind the scenes. Zig also has no hidden allocations (a function call will not allocate unless given an allocator) which fits this model.

[0]: https://ziglang.org/learn/why_zig_rust_d_cpp/ [1]: https://ziglang.org/learn/overview/

Re:Zig Performance Tracking Dashboard by e12e on Monday December 06, 2021 @10:25AM (#29460831)
See: https://ziglang.org/learn/why_zig_rust_d_cpp/#no-hidden-cont...

I'd venture a guess that exceptions might be the "least bad" here, and things like "a + b" resulting in "a. plus(b)" is considered worse.

At any rate they seem to want jumps/calls to be visible/obvious.