Zig has a LLVM backend that makes it have the same performance as any LLVM based lang, zig comptime is a good replacement for macros, in zig we have from u0 to u65535 (tho note they are not working well yet in things that are bigger than 512 in some machines and/or 128 in most), Zig has integrated Vector builtin, and well, as said before, compile time execution and ease of just talking to any C lang library
#What are the Pros and Cons of Zig over Hare and Vice Versa?
1 messages · Page 1 of 1 (latest)
this is what I can think of in atm
when I am not as sleep I will probably do a better write up
but a stubborn one, I can see him not linking zig
like not all zig
zig still has shortcommings and things people do not like
the most common and annoying for me to hear complaints from is people not liking the fact you cannot discard values
Or the fact that there are no warnings, just errors
Stuff like that
in zig _ = is the discard this value indeed
_ = someFunctionWithReturnThatIsNotAnErrorUnionToDiscard();
and with errors is:
_ = try someFunctionWithReturn();
or
_ = someFunctionWithReturn() catch returnValueDefault;
Also, zig uses async (With async/await keywords and resume/pause) for cooperative concurrency
instead of some other method that X programmer will like
It's simple in semantics I'd say
And ofc, is small too
already kinda done
Zig is not dependent of LLVM
but it's still kinda dependent of llvm lel
ZIg itself has the concepts of backends since self hosted arrived
x86 and wasm are the closest to be fone
ofc, outside the LLVM one
But there is also the C backend there
which still needs some work too
So in theory, you could compile zig with the capacity of just using native backends and no llvm
tho it's not plan afaik to have the backends being optimizing anything
except for llvm
(or if anyone adds a new backend that also optimizes)
Now, we depend on clang still for the translate-c @cImport feautres
until arocc becomes the compiler for that
no problem lel
just that andre do be a name lel
as in?
like v8?
because ofc there is the js runtime, but it uses JSCore
ye
yeah, not a bad project
No idea, don't think so
but if it's fun, all the lucks there
i find this to be a funny point
it's like saying that you like a book on the merit that it costs seven dollars
There is such category
Good books under 7 dollars
sure
but those books are good books
buying books purely because they're seven dollars or less without regard for quality of even what the book is about would be quite odd
Have done that
Bought all books under 2 usd
that I could get lmao
not sure that's a good criterion for a good time but you do you rimu :P
a hare
we offer iguanas
also the answer here is more biased towards zig
sooooo probably you can ask around in a hare centric place to get a hare centric one and compare
_ = foo, easy
i've never found this an issue. it's annoying thst it doesn't auto format tho
use your editor autoformat lel
zig fmt and all that
I mean, as in no need of doing anysyntax for it
oh. i rarely ever need to do it
Is zig fmt not auto enough?? 
zigfmt does it after it passes which is where the error happens
Oh automatic discards? But that defeats the point by hiding which variables you unintentionally didn't use
most languages do not format if there are errors
yeah, but the fact that a= 3 errors and doesn't format is annoying
but that rarely occurs
I don't understand, if the syntax fails to parse, how could it format it properly
no i understand that. i'm saying it's annoying that the auto format doesn't work as a byproduct of syntax errors