News for hackers. Stuff that matters.
Re:Why Zig when there is already C++, D, and Rust? by timClicks on Friday January 15, 2021 @06:56PM (#25798289)
This problem was exactly why I wrote Rust in Action. It teaches you systems programming alongside teaching Rust.

That said, you can get quite far without needing to understand pointers or memory management in any of the example languages you mentioned - "Clojure, Scala, F#, Rust". In the first 3, the garbage collector still does most of the work. In the last, there is are no calls to malloc() or free(). Rust's compile-time lifetime concept allows to compiler to do the work for you.

Re:Why Zig when there is already C++, D, and Rust? by 7thaccount on Friday January 15, 2021 @09:43PM (#25799499)
I should've been more specific. It's a different problem with Clojure, Scala, & F# where you're expected to understand the JVM & Java or the CLR & C#. It seems similar to Zig to me. There are numerous sources on learning C and I can barely figure out how to do a lot of things in Zig. Maybe a learn X in Y would help me.
Re:Why Zig when there is already C++, D, and Rust? by pjmlp on Saturday January 16, 2021 @04:23AM (#25801150)
If you already know any JVM or .NET language, the first step would be to understand the full stack, you don't need C for that.

Many of us were doing systems programming with other languages before C went mainstream.

What you need to learn is computer architecture.

Getting back to JVM or .NET, you can get hold of JIT Watch, VS debug mode or play online in SharpLab.

Get to understand how some code gets translated into MSIL/JVM, and how those bytecodes end up being converted into machine code.

https://github.com/AdoptOpenJDK/jitwatch/wiki/Screenshots

https://sharplab.io/

Languages like F# and C# allow you to leave the high level comfort and also do most of the stuff you would be doing in C.

Or just pick D, which provides the same comfort and goes even further in low level capabilities.

Use them to write a toy compiler, userspace driver, talking to GPIO pins in a PI, manipulating B-Tree data stuctures directly from inodes, a TCP/IP userspace driver.

Not advocating not to learn Zig, do it still, the more languages one learns the better.

Only advocating what might be an easier transition path into learning about systems programming concepts.

Re:Why Zig when there is already C++, D, and Rust? by 7thaccount on Saturday January 16, 2021 @07:55PM (#25807062)
No.

With Python, Perl,R, Bash... whatever, I never had to know any C to be very productive.

With F#, good luck not knowing C#. With Clojure, not knowing Java is a pain. I've tried both several times and was frustrated by constantly being referred to something Java related that I didn't understand. Because of that, I feel like those languages will never pick up anyone outside of regular users of C# or Java that want to try something different. Of course there are exceptions, but they're just that.

I agree with you that perhaps one should go through all of what you're referring to Ex: learn assembly, write a Forth...etc.

I'm just saying a lot of these supposedly amazing languages stagnant with regards to their userbase for a reason. APL uses an entirely different way of doing things than Clojure, but I'd bet I could get up to speed a lot faster with APL than Clojure where I constantly have to fight with learning the daunting ecosystem.

Re:Why Zig when there is already C++, D, and Rust? by mhenders on Friday January 15, 2021 @10:42PM (#25799823)
I enjoyed reading through https://ziglearn.org/
Re:Why Zig when there is already C++, D, and Rust? by timClicks on Sunday January 17, 2021 @01:16AM (#25808610)
Wow, that looks like a great (& concise!) resource