Hacker News new | ask | show | jobs
by AndyKelley 1022 days ago
You seem to be implying that zig is not open source or is otherwise unfriendly to contributions...?

It's a 501(c)(3) non profit and has been open source since `git init`. Even the financials are transparent to the public. What else could we possibly do?

1 comments

Zig being a language that most people are not familiar with is a very high barrier of entry in it of itself.

Given how few projects are written in it, the ROI of learning it is not that great.

I'm not 'against' Zig, it's just basic Lindy effect stuff. People don't want to build or invest in a foundation and then left hung out to dry.

Just like the rest of my development choices, I try to take calculated risk so that the platforms I'm building on have a high chance of lasting into the future.

We all know that a rewrite due to obsolescence can be the death knell for a project.

I’ve used zig for like a week total in my life and during that time I had a PR accepted to the main repo. It’s very much friendly to contributors.
I’m not saying they’re not friendly, I’m just saying learning a new language for probably the single purpose of contributing to this repo is a pretty high barrier of entry for contributors. It is great you overcame it.
Learning Zig is a very low barrier to entry. From experience I can tell you that learning the language is a matter of weeks and most of the code in the wild will be very accessible to you once you've done that, because there aren't as many different plateaus of skill in Zig as you would find in many other languages.

For many people reading and modifying the `bun` source code is likely something they could start doing tomorrow if they were so inclined, because they already know the semantics of Zig for the most part, and it's only a question of syntax.

And who has extra weeks that aren't students?
I don't know what to tell you. I don't know many languages that have a shorter on-ramp than Zig (or Odin). The obvious relevant language here would be Go, but Go wouldn't be as desirable in terms of producing as good results in a confident way; Zig (and Odin) is a lot easier to spot performance deficiencies in.

If your argument is somehow that Rust, C++, Nim, D or some other alternative would do better in terms of on-ramping I can only shake my head and move on with my day, as they are all clearly much more complicated languages and they all happen to produce code that is much harder to understand from a performance perspective. If the argument is something even higher level and even more opaque in terms of performance-related behavior I think you've missed an important part of why Bun chose Zig.

In most cases that don't involve "I already know this language" the equation can never be much better than "You have to learn Zig/Odin". For every person that already knows the language in question there's a bunch that don't, and the only solution to that is quick on-ramping because it'll benefit everyone over time. It doesn't matter whether you know the language already if the language is mostly trivial to learn, read and use.

P.S.: If the argument is that C would be a better choice I don't disagree as wildly as I do with any of the other situations. C with custom allocators and a ton of static analysis added to it will be mostly fine, but both Odin and Zig provide great things on top of C in terms of basic language features without taking on too much complexity.

Plenty of people. Otherwise open source wouldn't exist.