News for hackers. Stuff that matters.
Re:Zig in 30 Minutes by GordonS on Sunday January 03, 2021 @07:54AM (#25621489)
I saw something similar for both Nim and Rust the other day, both of which I believe target the same space (safer alternative to C).

Anyone who has dug into these care to comment about the pros and cons of each?

Re:Zig in 30 Minutes by gameswithgo on Sunday January 03, 2021 @07:59AM (#25621515)
Zig: a language that most people who like C but not C++ will probably love. simple and compiles fast and deals with undefined behavior and null more safely than C, easy c interop, no garbage collection

rust: more like a safe c++, you can get all the performance of c or c++ with the memory safety of a garbage collected language, as well as data race safety and nulls do bot exist. downsides are it can be a hard to learn paradigm to satisfy the compile time memory checks, and it is slower to compile

nim: sort of like a statically typed python. fun syntax and features, compiles to C, quickly. has in the past used garbage collection but a new reference counting mechanism has been introduced lately.

Re:Zig in 30 Minutes by chris_st on Sunday January 03, 2021 @09:38AM (#25622000)
Thanks, that's just the kind of comparison I was looking for.

If anyone has an idea about the (A) relative stability of the languages, and (B) the number of libraries/packages for things you don't want to write yourself, that'd be great.

Note:

> has in the past used garbage collection but a new reference counting mechanism has been introduced lately.

Reference counting is a kind of garbage collection. It's often faster than the "hello world" of gc, namely mark and sweep, but it has its own challenges.

Re:Zig in 30 Minutes by nimmer on Sunday January 03, 2021 @08:45PM (#25627135)
Nim is also as programmable as Lisp, and memory safe with automatic reference counting.
Re:Zig in 30 Minutes by mikewarot on Sunday January 03, 2021 @10:02AM (#25622121)
Thanks for summing it up, so now I know who Zig is targeted at, and it's not me. 8)
Re:Zig in 30 Minutes by paulsmith on Sunday January 03, 2021 @08:39AM (#25621688)
This is a great in-depth comparison of Zig and Rust from the POV of someone who has used both extensively for non-toy projects. https://scattered-thoughts.net/writing/assorted-thoughts-on-...
Re:Zig in 30 Minutes by GordonS on Sunday January 03, 2021 @12:57PM (#25623463)
Wow, this is a really in-depth article, and really informative - thanks for sharing!