Live data from Hacker News

Zig 0.5.0 Release Notes

ziglang.org

21–30 of 80 posts

Re: Zig 0.5.0 Release Notes

#21
> Speaking of performance, Zig is faster than C.

These kinds of claims make me so dubious for a language. Also who is trying to switch from C to get an ever-so-slightly performance improvement? That use-case goes to specialized hardware such as FPGAs.

Re: Zig 0.5.0 Release Notes

#22
post #14

Earlier quoted context omitted.

Yeah, I always check that. The part that says "There is no stdlib documentation yet, but it is planned for the next release" links to a 2015 github issue. That's why I was wondering if it's still a priority or if there were still high level concerns about stability/curation/etc preventing docs from being written.

It's an unwillingness to implement documentation generation twice. Why do it in the c++ compiler when the goal is to become self-hosted? I think there's a good answer to this which is, "because people really, really need documentation." So I am kicking around ideas of how this can be done without too much duplicate effort.

I see. Do you think there would be value in having someone just manually writing some interim docs (perhaps as a wiki) until the time when it can be properly generated?

This may seem like a weird place to draw experience from, but in my early days of programming, I've found the PHP docs extremely helpful largely thanks to community comments sections giving examples of how to do various things. Just some food for thought.

Re: Zig 0.5.0 Release Notes

#23

> Speaking of performance, Zig is faster than C. These kinds of claims make me so dubious for a language. Also who is trying to switch from C to get an ever-so-slightly performance improvement? That use-case goes to specialized hardware such as FPGAs.

It's not about the speed being a benefit per-se, but rather not a determent. One of the big reasons people still use C over other languages is that C is perceived to be faster (and indeed usually is).

Re: Zig 0.5.0 Release Notes

#24

> Speaking of performance, Zig is faster than C. These kinds of claims make me so dubious for a language. Also who is trying to switch from C to get an ever-so-slightly performance improvement? That use-case goes to specialized hardware such as FPGAs.

Whether the claim hold up or not. If you developed a language that's faster than C, would you not advertise that as a feature?

Re: Zig 0.5.0 Release Notes

#25
post #10

One thing that immediately stood out to me was the section titled “UEFI support” [1]. And there are demo projects and examples too. Neat! [1]: https://ziglang.org/download/0.5.0/release-notes.html#toc-UE...

Zig + UEFI = Comic Neue in the BIOS. [0] https://twitter.com/andy_kelley/status/1176561072398098432 Perhaps I could see some toy ransomware bootkit demanding the user to pay up or face using your computer with comic neue or comic sans as the default unchangeable font.

> Comic Neue

For the uninitiated:

http://www.comicneue.com/

As far as Comic Sans-like fonts go it's quite nice

Re: Zig 0.5.0 Release Notes

#26
https://ziglang.org/documentation/master/#Zen >> Minimize energy spent on coding style.

For me this is sort of important because languages not having standard coding style end up 10000 coding styles. Rust fmt is an excellent example for avoiding that. Does anybody use Zig + fmt?

I know they have something. https://github.com/ziglang/zig/issues/1523

Re: Zig 0.5.0 Release Notes

#27

> Speaking of performance, Zig is faster than C. These kinds of claims make me so dubious for a language. Also who is trying to switch from C to get an ever-so-slightly performance improvement? That use-case goes to specialized hardware such as FPGAs.

You picked that quote from the main page, not from the release notes, here is what directly follows:

* The reference implementation uses LLVM as a backend for state of the art optimizations.

* What other projects call "Link Time Optimization" Zig does automatically.

* For native targets, advanced CPU features are enabled (-march=native), thanks to the fact that Cross-compiling is a first-class use case.

* Carefully chosen undefined behavior. For example, in Zig both signed and unsigned integers have undefined behavior on overflow, contrasted to only signed integers in C. This facilitates optimizations that are not available in C. Zig directly exposes a SIMD vector type, making it easy to write portable vectorized code.

So the argument is "exact same compiler as C/C++, but more opportunities for optimization thanks to better semantics and better access to native instructions". This seems reasonable on its face, so care to elaborate on the doubt?

The arguments for not switching from C are often performance or target related, so a language that purports to be an alternative to C would want to point out that those issues aren't a problem.

The reasons to switch away from C are numerous and well documented.

Re: Zig 0.5.0 Release Notes

#28

https://ziglang.org/documentation/master/#Zen >> Minimize energy spent on coding style. For me this is sort of important because languages not having standard coding style end up 10000 coding styles. Rust fmt is an excellent example for avoiding that. Does anybody use Zig + fmt? I know they have something. https://github.com/ziglang/zig/issues/1523

There's a section in this notes about it https://ziglang.org/download/0.5.0/release-notes.html#zig-fm...

The end even has a link to a web-based version of it.

Re: Zig 0.5.0 Release Notes

#29
post #2

It's an exciting week for programming languages. First Nim, then Zig. Keep up the great work!

Does anyone here have a good understanding of the relative merits of Zig, Crystal, and Nim? Especially compared to higher profile languages like Rust and Go?

All of these languages seem to be statically compiled, and they all seem to promise both performance and safety. Rust and Go are discussed all the time on HN, so I expect most of us here have a reasonable notion of their relative benefits, for example, performance compared to ease of learning.

What about these lesser discussed languages Zig, Nim, and Crystal? Are their runtime performances comparable to one another? Are they equally safe to program in? What are their relative strengths? Or does it just come down to syntax preference?

I think there's value in having a lot of choices to program in, so I'm not asking which language is "best" any absolute sense. We're better off for having all of these languages coexisting. I'm just asking if anyone with experience in the three of them has any insight or impressions of their relative merits.

Re: Zig 0.5.0 Release Notes

#30

I might be alone with this thought: Zig seemed really appealing in the beginning, but now I dislike it more and more with each release. It does not seem to keep the simplicity of C at all, it has lots of peculiarities, and it is becoming more and more bloated. I would consider it a C++ replacement at this point, not a C replacement due to its increasing complexity. One of Zig's philosophy was simplicity[1], but I do…

Can you give examples of the peculiarities? I write cpp all day and zig is a nice change for me because of how simple it is to me

> Zig both signed and unsigned integers have undefined behavior on overflow, contrasted to only signed integers in C

make a feature unwanted in C, worse. nice.

Post reply on HN