Live data from Hacker News

Zig 0.4.0 Released

ziglang.org

51–60 of 141 posts

Re: Zig 0.4.0 Released

#52

Wow, that easy cross-compilation story is great. Neat ergonomic benefits also, like Zip downloading musl on your behalf to create static binaries.

Note that it's not downloading anything. Zig ships with musl source code and builds it from source for the target.

That makes a lot of sense.

I've been playing around with embedding sqlite for a Rust project and checking the C into the source tree made sense there too.

Re: Zig 0.4.0 Released

#53
post #50

Earlier quoted context omitted.

Yes, V is at a very early stage. I merely created an "about" page, then it got posted, got lots of attention, so I created a website and recently released a playground: https://vlang.io/play There's still a lot of work to do, but the language is going to be open-sourced very soon in early June.

Why delay it's release? Just throw up what you have on GitHub already. Btw you should update the language comparison page, see here https://forum.nim-lang.org/t/4758

What should I update?

Re: Zig 0.4.0 Released

#54
post #3

Zig's new release has a ton of improvements: new targets (e.g. LLVM 8, WASM, support tiers), C pointers, Vector type, better docs, and my personal favorite: Zig now makes things as static as possible by default. I love seeing all the progress with Zig, V, Muon, and Rust. All these languages are potentially-better systems languages than C/C++, with better safety, better definitions, and better semantics. Zig has an ex…

> All these languages are potentially-better systems languages than C/C++

No they are not. C++ has spent decades building "a better C/C++". Any language that ignores those lessons and takes the stance of "learning C++ is too hard, let's go shopping" is doomed to fail.

Re: Zig 0.4.0 Released

#55
post #3

Zig's new release has a ton of improvements: new targets (e.g. LLVM 8, WASM, support tiers), C pointers, Vector type, better docs, and my personal favorite: Zig now makes things as static as possible by default. I love seeing all the progress with Zig, V, Muon, and Rust. All these languages are potentially-better systems languages than C/C++, with better safety, better definitions, and better semantics. Zig has an ex…

> All these languages are potentially-better systems languages than C/C++ No they are not. C++ has spent decades building "a better C/C++". Any language that ignores those lessons and takes the stance of "learning C++ is too hard, let's go shopping" is doomed to fail.

Which of these languages do you think hasn’t learned the lessons of C++? Rust, for instance, has liberally encoded “modern C++” whilst plan not providing a lot of the features that make C++ problematic.

Re: Zig 0.4.0 Released

#56
post #36

"Zig is aggressively pursuing its goal of overthrowing C as the de facto language for system programming." If there's one truth I've learned in my decades of dealing with computers, it's that you can't beat C at being C. Before now, I'd never heard of Zig in particular, but I can think of several other languages that have tried or are currently trying. A lot of people seem to think they can make something a little be…

> If there's one truth I've learned in my decades of dealing with computers, it's that you can't beat C at being C.

Have you ever seen a language that has made a serious attempt?

The last few years, the only significant one I know of is Rust. But it's not really a C replacement. C is essentially fancy assembly. Rust is conceptually quite advanced.

Zig is one of very few languages I've seen that makes a serious attempt at being a better C. No garbage collection, no fancy borrowing checker, but quite a few improvements/features that actually matter to low-level/embedded programming.

My use-case is microcontrollers, and I've tried a few different new languages for fun. Zig is the first one where I actually came out of it wanting to use it for real. The only problem is it's still not finished.

Re: Zig 0.4.0 Released

#57
post #36

"Zig is aggressively pursuing its goal of overthrowing C as the de facto language for system programming." If there's one truth I've learned in my decades of dealing with computers, it's that you can't beat C at being C. Before now, I'd never heard of Zig in particular, but I can think of several other languages that have tried or are currently trying. A lot of people seem to think they can make something a little be…

Have you got an example of a C replacement that was actually better than C, got as far as Zig and is now abandoned? I can't think of one. I've been look for a better C for 15 years and Zig is the best candidate I've found. I don't think DasbetterC counts, since it is a side effort to the greater goals of D.

Re: Zig 0.4.0 Released

#58

If Zig's goal is 'replacing C', then its DOA. How can this be a valid goal for a programming language?

Its goal is similar to that of Rust. I'm sure it has more goals than only replacing C. Effectively it can become yet another systems programming language, but potentially one of the best, and thus replace C (or work alongside C in existing programs).

I haven't played with Zig but it looks a lot more appealing than e.g. Rust to me.

In the end though, I'll prefer plain old C (C99 or C11).

Re: Zig 0.4.0 Released

#59
I have one criticism: although zig has advertised very early on an amazing array of targets (probably taken from clang/llvm itself), some of the most esoteric ones have never worked for me, like powerpc (32bit) and MIPS. The blame is not entirely in zig but also in LLVM.

It would be more fair to not even mention them as supported _at all_, or at the very least to document them as Tier 4.

Re: Zig 0.4.0 Released

#60
post #3

Zig's new release has a ton of improvements: new targets (e.g. LLVM 8, WASM, support tiers), C pointers, Vector type, better docs, and my personal favorite: Zig now makes things as static as possible by default. I love seeing all the progress with Zig, V, Muon, and Rust. All these languages are potentially-better systems languages than C/C++, with better safety, better definitions, and better semantics. Zig has an ex…

> All these languages are potentially-better systems languages than C/C++ No they are not. C++ has spent decades building "a better C/C++". Any language that ignores those lessons and takes the stance of "learning C++ is too hard, let's go shopping" is doomed to fail.

Apologies for being a bit blunt, but:

For all the time and work poured into C++, it has remarkably little to show over plain old C99.

Some of those new "better C" languages are the work of individuals and very small teams, yet they are able to build more progressive "better C" languages than C++ can ever be because it is held back by the need for backward compatibility for 'failed features' and 'design-by-committee'.

If all that ever comes out of those small 'better C' languages is some sort of consensus of which core-set of features actually makes a 'better C', than they have already contributed more to programming language development than C++.

Post reply on HN