Live data from Hacker News

Zig 0.4.0 Released

ziglang.org

101–110 of 141 posts

Re: Zig 0.4.0 Released

#101
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…

> "Zig is aggressively pursuing its goal of overthrowing C as the de facto language for system programming."

I think it's fine to have aspirational but unrealistic goals.

> 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.

You can't, but as the realm of computing expands, it makes space for new languages. There's a lot of room in the space adjacent to C. We have embeddable languages -- schemes, lua, even Python to some extent. We have languages like Zig, Rust, and D, that can compile to object files that look as if they came from C. And we have other languages that generate C, like lisps and ocaml have done for 20 years now.

C doesn't have to be a language anybody writes, to be a language that everybody uses.

Re: Zig 0.4.0 Released

#102
post #11

[Off-topic] Another programming language website with no code examples front/center on the homepage? When you click "Download & Documentation" there's a link under the headline "master" to the long-form documentation which has some examples: https://ziglang.org/documentation/master/ Edit: also found a blog post with a nice introduction: https://andrewkelley.me/post/intro-to-zig.html and an examples directory: https:/…

My favorite website for an example of this functionality is: https://dlang.org/ . Succinct examples on a clean page, no fluff.

Yes, the homepage for Go is similar https://golang.org/

Re: Zig 0.4.0 Released

#103
post #34

Earlier quoted context omitted.

Honestly, I don't see it happening. Zig and rust and jai and d all feast on c's remains, but the result can only be fragmentation. And then you lose one of the big draws of c: ubiquity. Zig has two compilers. Rust has one (serious) compiler. Jai has 1, d has either 1.5 or 3.5 (depending on how you count). And although all those languages want to replace c as the language-that-you-use-for-everything, and they might ea…

Maybe I'm a bit of a rust fanboy and a bit of a skeptic but Zig and Jai aren't going anywhere. Zig appears to be a largely single contibutor ( https://github.com/ziglang/zig/graphs/contributors the creator has As for rust we don't know yet how big of a chunk of marketshare it will take from new c and c++ code. Not many people still use c code for "everything", most have already switched.

C was largely a single contributor.

Re: Zig 0.4.0 Released

#104
post #72
post #68

Earlier quoted context omitted.

> COM/UWP Assuming with COM/UWP you mean "UWP's flavor of COM" instead of "COM and/or UWP", is anyone actually using that outside of mobile trash and game engine backends for XB1? All the Windows software i use and see people make are either Win32 or (much more often) built on top of Win32 (well, UWP is technically also built on top of Win32, but you are supposed to ignore that and act as if it isn't the case).

Yes they are, UWP is the future of Windows APIs since Windows 8, like it or not. Win32 is slowly being migrated into sandbox model with each Windows 10 release and hasn't seen any big update since Vista. All major APIs introduced since then are based on COM.

> Yes they are, UWP is the future of Windows APIs since Windows 8, like it or not.

Well, i don't, but my two main gripes is that it seems to be an evolution of WPF which i never liked and that it is tied to a more locked down mobile-like approach that i abhor.

> Win32 is slowly being migrated into sandbox model with each Windows 10 release

What are you talking about?

> and hasn't seen any big update since Vista.

I'd say that it hasn't seen any big update since Windows 98 :-P but as long as it works i do not care.

> All major APIs introduced since then are based on COM.

COM or COM/UWP?

Re: Zig 0.4.0 Released

#105
post #69
post #34

Earlier quoted context omitted.

Maybe I'm a bit of a rust fanboy and a bit of a skeptic but Zig and Jai aren't going anywhere. Zig appears to be a largely single contibutor ( https://github.com/ziglang/zig/graphs/contributors the creator has As for rust we don't know yet how big of a chunk of marketshare it will take from new c and c++ code. Not many people still use c code for "everything", most have already switched.

Rust is especially attractive because of no-GC. Systems, embedded, performance oriented projects have real reasons to adopt this language.

so does zig and jai tho..

Re: Zig 0.4.0 Released

#106

There are so many neat design choices in zig that make it a joy to code in it even these days. Can't imagine what we get with 1.0. Some of my personal highlights: - clean syntax - comptime (as explicit and simple as it should be) - reflection - minimal/no external dependencies - single threaded mode (instead of taking cuts at runtime) - concise and explicit error handling - build-in build system - amazing C interop .…

The standard library is surprisingly present to read and learn from, kinda like go. I really enjoy learning zig.

Re: Zig 0.4.0 Released

#107

Hm, a one-liner turnoff: const std = @import("std"); * pointless semicolon * pointless "@" * seemingly pointless "const" (can you define a mutable import?) * unnecessary verbosity defining an identifier for the import when there's almost never a need for naming it differently (i.e. it should default to "const std" if you just type "import 'std'"... I like Go because it avoids pointless verbosity most of the time.

I think you can also write use @import("std");

but then you've just imported all of std into your own namespace. (probably not using the correct terminology here).

At any rate the const indicates you're not changing, and the std is the name given to the root of the hierarchy for importing "std" into.

Sure go lets you do this too, but has shorthand.

    import "fmt"
can also be done as

    import fmt "fmt"
but why would you do that?

The go equivalent of zig's "use" is

    import . "fmt"
"." means "the current working directory" on unix so it's familiar to folks in that sense perhaps. Principle of least surprise is nice when the syntax is terse.

Still, I think I like zig. I feel like I want to try to write something non-trivial with it when I look at the features.

I've already done that a few times with Go, and I enjoy that too.

Re: Zig 0.4.0 Released

#108
post #15
post #14

Earlier quoted context omitted.

I’m honestly way more interested in Jai.

Can you link to Jai?

Here is a link to a primer written by the community: https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md

Right now, the only way to actually see the language in action is to tune in to Jonathan's livestreams on Twitch. He is writing his next game entirely in Jai. He also streams compiler development every now and then (last night was a compiler stream).

Re: Zig 0.4.0 Released

#109
post #72

Earlier quoted context omitted.

Yes they are, UWP is the future of Windows APIs since Windows 8, like it or not. Win32 is slowly being migrated into sandbox model with each Windows 10 release and hasn't seen any big update since Vista. All major APIs introduced since then are based on COM.

I believe Windows will sooner become completely irrelevant than UWP becoming the dominant API to write Windows applications. Also seeing how MS is switching the system browser to Chromium, and kills the UWP version of MS Office, it looks like most people in Microsoft have lost faith in UWP too.

Based on previous history, chances are Microsoft will first abandon UWP (but leave its zombified corpse in Windows for backwards compatibility) and introducing something new-but-incompatible-with-anything-existing before Windows become irrelevant. Actually, they might do this 2-3 times before that.

Re: Zig 0.4.0 Released

#110
post #34

Earlier quoted context omitted.

Maybe I'm a bit of a rust fanboy and a bit of a skeptic but Zig and Jai aren't going anywhere. Zig appears to be a largely single contibutor ( https://github.com/ziglang/zig/graphs/contributors the creator has As for rust we don't know yet how big of a chunk of marketshare it will take from new c and c++ code. Not many people still use c code for "everything", most have already switched.

What is the actual argument that you support with pointing out that Zig is "largely single contributor"? Linux was largely a single contributor up to a point.

There is nothing wrong with single contributor languages. But for every C there are thousands of flatlined github repositories of single contributor languages. Building a language is a marathon, not a sprint. It takes years and years to grow something worthwhile, and this requires a lot of persistence. In the meantime, technical challenges, finances, family, and even busses get in the way of languages being fully realized. Having a team rather than a BDFL increase the chances of a language flourishing and persisting.
Post reply on HN