I wish more programming languages provided interfaces for building libraries around the std library like what Go does. It makes using libraries a lot better because you aren't dependent on that library as long as it uses the std library interface.<p>This is huge for things like database drivers which might become outdated or not support certain features. In Go switching database drivers in as simple as importing the new library. You dont have to change your code.<p>In rust for example you have to go out and pick a database driver and no two libraries will work the same. If you pick one postgres library and it becomes outdated you have to go rewrite you code to support the next one to move too.<p>This is why I would never use Rust, or Zig for being things like http servers.
I just tried it out and it's very slow. Using `wrk` to hit a basic endpoint that just prints "hello", I got ~500 req/sec. Using a third party zig implementation, I got ~175000 req/sec.<p>It's also both cumbersome to setup and use.<p>Before learning Zig, I used to think Zig needed an http server in the standard library. After using it for a few months, and watching this implementation get added, I think it's a mistake - there just isn't enough bandwidth to support a _quality_ kitchen-sink included stdlib.
I wish Zig had Go-like interfaces. I understand why they don't as they have decided control flow must be explicit but having to include a heap of boilerplate to get the same result isn't a win for readability or maintenance. Given my limitations and tastes I would not want to write or maintain web backend code in Zig but there is a lot to like about Zig as a C replacement and having batteries included for things like HTTP is a win for any language.
Very nice!<p>I couldn't grok from this test suite alone, but I do have questions.<p>1. Do either the server or client support 'full duplex', i.e. streaming the response body while streaming the request body in parallel?<p>2. Are there provisions for HTTP/2?<p>I'll answer my own questions if I find the answers first, but I'm not very good at Zig.
Zig starting to look nice, but compile speed is painfully slow..<p>Everyone wants to go after Go, but they fail to understand how important compile speed is
I tend to think that standard libraries should be minimal enough to contain mostly code that is reasonably trusted to be near optimal.<p>I don’t think that can be the case here.<p>This should be released as reference implementation, an example, provided for convenience and education, probably not production ready…
Is there a Rust vs Zig war going on? I just started to learn Rust because I figured that it was going to be the C++ successor and I want to be sure that my skills are (somewhat) future-proof. So what's going on with Zig? Should I learn Zig?
Nim has been unpleasant trying to get https client working with a staric build because it needs openssl. Does this support native TLS and static linking?
yesss, been waiting for this, though I've waited long enough that I forgot why I wanted it.<p>it hasn't been that long, I'm just an airhead.