top | item 27280047

(no title)

Ankhers | 4 years ago

Hare is technically an unreleased project. It was accidentally released here in the comments yesterday of another blog post by Drew (despite a big banner asking people not to link to the page for the time being).

I'm not saying this is the entire answer, but Drew has some issues with Zig https://news.ycombinator.com/item?id=15494222.

discuss

order

UncleOxidant|4 years ago

His issues (from 3.5 years ago):

"- The string handling is braindead"

How so? Not a lot of specificity here.

"- The compiler and stdlib is immature. This seems like the first programming language the guy has written. You should have a few failures to learn from before you make a Serious Programming Language imo."

The Hare compiler isn't immature? As noted, this was 3.5 years ago.

"- Code run at compile time is a neat idea but has a weird syntax and really really complicates the internals of the compiler and related tooling."

And yet this has become one of Zig's strongest points.

lhorie|4 years ago

Re: strings, this is a thread about that topic: https://github.com/ziglang/zig/issues/234

It strikes me as a difference in opinion wrt at which level should strings be handled (zig folks saying it should be a userspace/stdlib concern, ddevault saying it should be a core language concern). IMHO the point of contention seems to be that ddevault considers stdlib an integral part of a language, whereas zig has an ideology that aggressive support for freestanding, no-stdlib-whatsoever workflows is part of its scope.

From my understanding from the other HN thread, Hare appears to use QBE as a backend, which only targets x64 (whereas Zig says it'll continue to use LLVM for prod builds). Zig is also somewhat unique among low level languages in that it put quite a non-trivial amount of legwork on cross-compilation plumbing (e.g. the article about compiling C extensions for go via zig[0])

[0] https://dev.to/kristoff/zig-makes-go-cross-compilation-just-...

robinei|4 years ago

Since then Zig has come quite far in its self-hosted rewrite. So the point of it being Andrew's first compiler is no longer valid.

dralley|4 years ago

Maybe it has changed in the last 3 years, but "comptime" doesn't seem like such a "weird syntax" to me?