⚡️ But it seems I've found what I was looking for ⚡️
After all, I was wrong to rule out one of the contenders for the "low-level Go" spot
#rust #go #zig
# [ $davids.sh ] · message #205
⚡️ But it seems I've found what I was looking for ⚡️
After all, I was wrong to rule out one of the contenders for the "low-level Go" spot
#rust #go #zig
@ [ $davids.sh ] · # 885
I've mentioned this language more than once, and here I decided to write something in it... and you know, it worked out.
Zig is a language that took C and just implemented fresh practices into it + made a very intuitive memory allocation system + (almost) built asynchronous programming for multithreading into std.
I believe it's already quite suitable for single-thread applications, and for multi-threading, you can either steal how it's done in bun, or wait until they include the built-in event loop (presumably in the next few months).
As soon as they finish the event loop, I'll immediately start experimenting with it.
The main problem now is that you have to know C to understand how to write in Zig, because the documentation isn't for beginners yet + you can only find answers on Reddit.
BUT I found the coolest life hack: if you want to know how to do something in Zig, just google: "how to do ... in C" – and try to find the same thing in Zig.
It has worked 10 out of 10 times so far.
@ Artur G · # 890
@ Leijona · # 891
Zig is also on my list. All I know about it is that some well-known figures from the Rust world have shown interest and left positive reviews.
@ [ $davids.sh ] · # 892
There's another interesting contender: Nim
It's something of a middle ground between Rust and Zig, with one giant BUT: it's been around for about 10 years, v1.0 was released in 2019, and v2 very recently, and yet it's completely unpopular...
Maybe I'm not understanding how to properly assess its popularity, but, for example, there are very few companies that use it.
I'd say Zig is still more interesting, but Nim offers most of the things I need from Zig, and at the same time, it's less popular than the same raw Zig.
@ Leijona · # 893
Nim isn't very useful for me because of the GC. The idea of a programming language with zero-cost abstractions, that is safe (with an explicit unsafe zone), suitable for writing operating systems and high-load enterprise-level applications, continues to excite me. There are only a few options to choose from here. And I have a feeling that Rust might not be the number 1 choice.
@ [ $davids.sh ] · # 895
Yes, now I realize: although GC there is a matter of choice, most likely such a large number of GCs leads to problems, and the choice "without GC" too
@ [ $davids.sh ] · # 896
Do you have any other alternatives?
@ [ $davids.sh ] · # 899
Hahaha, I just saw the line in the section about no GC:
"Allocated memory is simply never freed."
I never thought such bullshit could be made...
That's it, forget about Nim.