7 ms·
> Learning Zig is not just about adding a language to your resume. It is about fundamentally changing how you think about software. I'm not sure what they expe
by poly2it 11mo ago
> Learning Zig is not just about adding a language to your resume. It is about fundamentally changing how you think about software.
I'm not sure what they expect, but to me Zig looks very much like C with a modern standard lib and slightly different syntax. This isn't groundbreaking, not a thought paradigm which should be that novel to most system engineers like for example OCaml could be. Stuff like this alienates people who want a technical justification for the use of a language.
- userbinator 11mo agoFor those who actually want to learn languages which are "fundamentally changing how you think about software", I'd recommend the Lisp family and APL family.
- zwnow 11mo agoI'd also throw Erlang/Elixir out there. And I really wished Elm wasn't such a trainwreck of a project...
- matu3ba 11mo agoWhat is the most optimal Erlang/Elixir you can think of regarding standardized effect systems for recording non-determinism, replaying and reversible computing? How comparable are performance numbers of Erlang/Elixir with Java and wasm?
- zwnow 11mo agoI'd recommend asking the Elixir community about this as I didn't even understand your question. I am by no means a professional with Erlang/Elixir. I threw it out there because these language force you to think differently compared to common OOP languages.
- 59nadir 11mo agoNo need to include Elixir here; none of the important bits that will change how you view software come from Elixir, it's just a skin on top of Erlang (+ some standard library wrappers) and that's it.
- zwnow 11mo agoI'd argue more people use Elixir over Erlang at this point. Sure its just an abstraction on top of Erlang, but people learn through Elixir nowadays, not through Erlang.
- 59nadir 11mo agoIf you want to learn the actual mind changing aspects of the BEAM, clearly learning the simpler, smaller language with a more direct route to the juice is the way to go. Hence Erlang, not Elixir. I learned Elixir first back in 2015, and then learned Erlang, and have had the pleasure of using both in production. When all was said and done I really think Erlang was better, especially over a long enough time frame. As a general point I'd like to state that I don't think it really matters what "people" do when you're learning for yourself. In the grand scheme of things approximately no one uses the BEAM, but this doesn't mean that learning how to use it is somehow pointless.
- fuzztester 11mo ago>actual mind changing aspects of the BEAM What are those aspects? newb to this area.
- 59nadir 11mo agoA few key things: - Leaning on a pre-emptive scheduler to maintain order even in the presence of ridiculous amounts of threads ("processes" on the BEAM) running - Using supervision trees to specify how and when processes and their dependents should be restarted - Using `gen_server` processes as a standard template for how a thread should be running There's more to mine from using the BEAM, but I think the above are some of the most important aspects. The first two I've never found to be fully replicated anywhere other than in OTP/BEAM. You don't need them, but once you're bought into the BEAM they're incredibly nice to have.
- miki123211 11mo agoAm I correct that you can essentially "learn APL without learning APL" by just learning Numpy / Pytorch? I looked at array languages briefly, and my impression was that"ooh this is just Numpy but weirder."
- veqq 11mo agoNot even close. While Numpy has many similar operations, it lacks the terseness, concepts like trains and forks etc. Modern APL style doesn't use... control flow (neither recursion nor loops nor if...) and often avoids variables (tacit/point-free style).
- benji-york 11mo agoYou might enjoy this video: https://www.youtube.com/watch?v=a9xAKttWgP4 https://www.youtube.com/watch?v=a9xAKttWgP4
- pjmlp 11mo agoAnd Prolog as well.
- fuzztester 11mo agoAnd Forth. And 6502 assembly. ;) And SNOBOL. And Icon. And ...
- deleted 11mo ago[deleted]
- wavemode 11mo agoMuch of the book's copy appears to have been written by AI (despite the foreword statement that none of it was), which explains the hokey overenthusiasm and exaggerations.
- ninetyninenine 11mo agoThat's ok, in the near future nobody will actually read this book. AI will be reading it. This is training data.
- keybored 11mo agoAs we know AI is at least as smart as the average human. It knows the Zeitgeist and thus adds “No AI used” in order to boost “credibility”. :) (“credibility” since AI is at least as smart the average human, for us in the know.)
- obviouslynotme 11mo agoThere is nothing new under the Sun. However, some languages manifest as good rewrites of older languages. Rust is that for C++. Zig is that for C. Rust is the small, beautiful language hiding inside of Modern C++. Ownership isn't new. It's the core tenet of RAII. Rust just pulls it out of the backwards-compatible kitchen sink and builds it into the type system. Rust is worth learning just so that you can fully experience that lens of software development. Zig is Modern C development encapsulated in a new language. Most importantly, it dodges Rust and C++'s biggest mistake, not passing allocators into containers and functions. All realtime development has to rewrite their entire standard libraries, like with the EASTL. On top of the great standard library design, you get comptime, native build scripts, (err)defer, error sets, builtin simd, and tons of other small but important ideas. It's just a really good language that knows exactly what it is and who its audience is.
- ninetyninenine 11mo ago>Rust is that for C++ No it's not. Rust has roots in functional languages. It is completely orthoganol to C++.
- jasode 11mo agoGraydon Hoare, a former C++ programmer on Mozilla Firefox and the original creator of Rust, acknowledges that for many people, Rust has become a viable alternative to C++ : https://graydon2.dreamwidth.org/307291.html https://graydon2.dreamwidth.org/307291.html And on slide #4, he mentions that "C++ is well past expiration date" : https://venge.net/graydon/talks/intro-talk-2.pdf https://venge.net/graydon/talks/intro-talk-2.pdf It's possible that Graydon's earliest private versions of Rust the 4 years prior to that pdf were an OCaml-inspired language but it's clear that once the team of C++ programmers at Mozilla started adding their influences, they wanted it to be a cleaner version of C++. That's also how the rest of the industry views it.
- krona 11mo ago> Rust has become a viable alternative to C++ Alternative yes, derivative no. Rust doesn't approach C++'s metaprogramming features, and it probably shouldn't given how it seems to be used. It's slightly self-serving for browser devs to claim Rust solves all relevant problems in their domain and therefore eclipses C++, but to me in the scientific and financial space it's a better C, making tradeoffs I don't see as particularly relevant. I say this as a past contributor to the Rust std lib.
- wolvesechoes 11mo agoZig community really tries to match Rust one in terms of cult resemblance.
- IshKebab 11mo agoDid it occur to you that Rust and Zig might actually be very good?
- wolvesechoes 11mo agoOh, they are. Like a multitude of other languages.
- IshKebab 11mo agoThere aren't a multitude of other languages that compete with Rust and Zig in the "zero cost abstraction" domain. There's like, Ada... and D sort of. Rust and Zig aren't merely very good, they are better than the alternatives when you need a "zero cost abstraction" option. But sure, go ahead and dismiss it as a cult if it makes you feel better. I bet you were one of the people who dismissed the iPhone as "just apple fanbois" back in the day. Won't amount to anything.
- wolvesechoes 11mo agoBut the concern in this thread wasn't that people consider Zig or Rust good, so don't try to frame it this way, because it is dishonest. Original quote: > [Learning Zig] is about fundamentally changing how you think about software. This is not the same. Something like it could be said about Lisp, Forth, Prolog, Smalltalk, Fractran or APL, even Brainfuck, not Rust or Zig. No, thinking about object lifetimes or allocators is not "fundamental change" in how to think about software. It is bread and butter of thinking about software. Therefore I believe this is cultish behavior - you assign extraordinary properties to something rather dull and not that much different from other mainstream languages. > I bet you were one of the people who dismissed the iPhone as "just apple fanbois" back in the day Wrong. I still dismiss people praising Apple, swallowing some bullshit about "vision" etc. as fanboys.
- deleted 11mo ago[deleted]
- cindyllm 11mo ago[dead]
- IshKebab 11mo agoI guess comptime is a little different but yeah I wouldn't say it fundamentally changes how you think about software. I wouldn't say that about OCaml either really though. It's not wildly different in the way that e.g. Lean's type system, or Rust's borrow checker or Haskell's purity is.
- vlovich123 11mo agoD has similar comptime capabilities if I recall correctly and proceeds Zig by almost 2 decades or so.
- IshKebab 11mo agoI don't think it's the same. You can do template metaprogramming, but Zig lets you use Zig itself which is a lot nicer. I'm not a D programmer though so I could be wrong.
- vlovich123 11mo agoI’m not a D programmer but I remember talks by Alexandrescu where he was arguing for this capability in C++ and ultimately one of his stated reasons why he switched from C++ to D Look up static if - AST manipulation in native D code.
- adev_ 11mo ago> It is about fundamentally changing how you think about software. > I'm not sure what they expect, but to me Zig looks very much like C Yes. I think people should sincerely stop with this kind of wording. That makes Zig looks like some kind of cult. Technically speaking, Zig democratized the concept of imperative compile time meta-programming (which is an excellent thing). For everything else, this is mainly reuse and cherry pick from other languages.
- deleted 11mo ago[deleted]
- pron 11mo agoZig is so novel that it's hard to find any language like it. Its similarity to C is superficial. AFAIK, it is the first language ever to rely on partial evaluation so extensively. Of course, partial evaluation itself is not new at all, but neither were touchscreens when the iPhone came out. The point wasn't that it had a touchscreen, but that it had almost nothing but. The manner and extent of Zig's use of partial evaluation are unprecedented. I have nothing against OCaml, but it is a variant of ML, a 1970s language, that many undergrads were taught at university in the nineties. I'm not saying everyone should like Zig, but its design is revolutionary: https://news.ycombinator.com/item?id=45852774 https://news.ycombinator.com/item?id=45852774