Live data from Hacker News

Assorted Thoughts on Zig and Rust

scattered-thoughts.net

121–130 of 307 posts

Re: Assorted Thoughts on Zig and Rust

#121
Zig has very little focus on safety and has had several regressions related to security and correctness, most of which Andrew has said he doesn't care about as much. This concerns me greatly.

The discord community operates like a cult (sound familiar, Rust community?) and any criticisms or anything not exuberantly positive results in a flame war.

I saw all of that happen several times so far with the community and it's ultimately what drove me away from the project altogether.

Re: Assorted Thoughts on Zig and Rust

#122
post #115
post #105

Earlier quoted context omitted.

Can you please provide an example of Zig "working out the dependency"? I'm struggling to make sense of your comment.

I could write a concrete example that will work in zig and fail in common lisp, but maybe this link is enough? https://ziglang.org/#Order-independent-top-level-declaration...

Oh, so is the point that in Zig, functions with comptime parameters are more or less identical to regular functions in that regard?

Re: Assorted Thoughts on Zig and Rust

#123
I believe if you write tests hooking up your tests with the test allocator will effectively prevent all blatant UAF and memory leak events. More subtle ones that happen due to spooky action at a distance and wierd incomposability might be out of reach.

(Not at op, who does write tests:) You are writing tests, right? ;)

Re: Assorted Thoughts on Zig and Rust

#124
post #121

Zig has very little focus on safety and has had several regressions related to security and correctness, most of which Andrew has said he doesn't care about as much. This concerns me greatly. The discord community operates like a cult (sound familiar, Rust community?) and any criticisms or anything not exuberantly positive results in a flame war. I saw all of that happen several times so far with the community and it…

Every language has overzealous fans, when a language is new this is likely a largely percentage of the community. If you use that as a reason to avoid a language you will likely just end up avoiding new languages.

Re: Assorted Thoughts on Zig and Rust

#125

Earlier quoted context omitted.

(By the way, Hacker News doesn't support markdown; indent your code by two spaces, rather than using fences. https://news.ycombinator.com/formatdoc ) Just a few small things: > This is a huge one for me, and I really don't understand why Rust didn't jump on this earlier. Doing this well is not easy. Exposing a full language at compile time isn't a difficult feature, but doing compile-time execution in a sound, safe w…

> doing compile-time execution in a sound, safe way is not simple. For example, cross compilation becomes more of a thing. It is easy to accidentally break the type system. Why? I don't think I've ever seen a concrete example of why this isn't simple (but I'm not really a compiler person, so there might be!). I can imagine plenty of ways of doing Bad Things, like adding compiler flags based on what day it is, but I c…

> It sound like people writing books without the rules on verb conjugation being really set.

I'm sure this happened earlier in the history of English. Of course, humans are much more forgiving than compilers.

Re: Assorted Thoughts on Zig and Rust

#126
post #121

Zig has very little focus on safety and has had several regressions related to security and correctness, most of which Andrew has said he doesn't care about as much. This concerns me greatly. The discord community operates like a cult (sound familiar, Rust community?) and any criticisms or anything not exuberantly positive results in a flame war. I saw all of that happen several times so far with the community and it…

Any new language project in 2020, for good or ill, is going to be highly opinionated and self-select for people who share similar views on language design. When someone comes along on their discord and says "you need to have this security and correctness issue that I care about deeply fixed yesterday" you really can't be surprised if not everyone shares your urgency- There are probably other languages/communities that DO care deeply about exactly those types of issues, that's the beauty of the long tail of the internet.

Re: Assorted Thoughts on Zig and Rust

#127
post #76
post #20

Earlier quoted context omitted.

I actually think NPM is an amazing tool. When comparing to many other dependency management solutions, NPM: 1. has a nicer user experience 2. gives a lot of confidence that a project will be reproducible across environments, with only a package.json file Cargo is pretty close, but NPM is the gold standard for dependency management as far as I'm concerned.

Last time I used NPM, it tended to download megabytes of dependencies for each project . If you used a package in, say, 10 different projects, you had 10 copies of it. Did they solve that issue?

This is still the case. There are some alternate package managers (pnpm, yarn) that handle this better, but they both break some tooling. In practice, I've found that it's not too big an issue—most people have plenty of disk space, and if you are running low you can just `rm -rf node_modules` on some old projects and install again next time you touch them.

Re: Assorted Thoughts on Zig and Rust

#128
post #122
post #115

Earlier quoted context omitted.

I could write a concrete example that will work in zig and fail in common lisp, but maybe this link is enough? https://ziglang.org/#Order-independent-top-level-declaration...

Oh, so is the point that in Zig, functions with comptime parameters are more or less identical to regular functions in that regard?

Exactly. You can also use non-comptime functions in comptime, if it avoids certain types of stateful behaviour.

Re: Assorted Thoughts on Zig and Rust

#129
post #121

Zig has very little focus on safety and has had several regressions related to security and correctness, most of which Andrew has said he doesn't care about as much. This concerns me greatly. The discord community operates like a cult (sound familiar, Rust community?) and any criticisms or anything not exuberantly positive results in a flame war. I saw all of that happen several times so far with the community and it…

No offense intended at all but I had a similar experience with the zig community.

Re: Assorted Thoughts on Zig and Rust

#130
post #30

Earlier quoted context omitted.

> If Zig can settle in the niche that C is used for today That niche is "code that needs to be portable to any system with a C compiler", or "... to a particular system that only has a C compiler" so i am not sure it can. There are lots of projects using C that aren't in that niche, but i don't believe there is a good reason for any of them to be using C over C++ these days. It's either history, inertia, or Luddism.

> ... for any of them to be using C over C++ these days. That's the old (and frankly: tiresome) mindset that C++ is a successor and improvement of C. After using "modern C" (as in C99 or later) for a while it becomes quite obvious that this isn't the case anymore, instead C++ was a fork of C and developed into a very different direction (including developing the original C subset into a non-standard C dialect). Espec…

> That's the old (and frankly: tiresome) mindset

It really isn't. It's based on comparing the languages as they exist today. C++ is vastly more productive.

Post reply on HN