Thoughts on zig?

I've been recently learning zig and it feels like a weird one. Like it's got some nice features but then it has yet another hideous syntax like rust and they keep on changing it with proposal after proposal.
I don't like how builtin functions are prefixed with @, that just seems like 2 different ways to do the same thing. Especially when I need to coerce something to something else it's just cumbersome. What are you guys' thoughts on this? I think I've explored enough and will be going back to Rust again.

Shopping Cart Returner Shirt $21.68

Nothing Ever Happens Shirt $21.68

Shopping Cart Returner Shirt $21.68

  1. 2 weeks ago
    Anonymous

    It is pointless to discuss zig on IQfy because the thread inevitably gets swarmed by console warring homosexuals Ctrl+V-ing youtube videos they didn't even watch and most people haven't actually written a line of code in it.
    >I don't like how builtin functions are prefixed with @, that just seems like 2 different ways to do the same thing.
    Builtins are fundamentally different from the std library because they implement functionality that is unfeasible in user space. Coercion (as in safe conversion) generally only requires a target type (inferred either a typed result variable or @as) and aren't that bad. Unsafe conversions are intentionally more verbose to put emphasis on their consequences should the conversion fail, unlike something like C which will happily thrash your program.

  2. 2 weeks ago
    Anonymous

    hard to find reasons to use it over rust, but the comp time type-valued functions are super clean and satisfying.

    • 2 weeks ago
      Anonymous

      yeah it's got good features, but it just doesn't seem as polished as rust, makes sense for pre 1.0 but still, it's been in development for 8+ years now.

      If you're going back to rust then zig wasn't for you, it's like c but more explicit and with better build tools. Pretty good from the small things I've done, keeping an eye out for the first full release.

      I didn't hate it but it wasn't the c killer I was expecting. I did love that allocators are first class citizen. I also loved the defer keyword, really easy to manage heap allocations and freeing memory because they're together in code. Possibly one of it's best feature imo. errors as values is good too. I'll wait until 1.0.

      • 2 weeks ago
        Anonymous

        I'll take anything to get rid of cmake honestly.

        • 2 weeks ago
          Anonymous

          do you like build.zig?
          I still use cmake mainly because everyone else does and I've committed warcrimes with it now so I sort of know all the ins and outs (still hate it).
          my favorite was replacing a Java build system with cmake. still kek to this day thinking about javajeets having to inherit that. To be fair, it was leagues better than the maven garbage it was using and it integrates perfectly with the rest of the project.

          • 2 weeks ago
            Anonymous

            I like cross compilation being as stupid simple as possible so yes I do like it.

      • 2 weeks ago
        Anonymous

        >I did love that allocators are first class citizen.
        I didn't only because it just meant more fat pointers everywhere. Not saying it wasn't admirable, but I'd rather seem how you can use some modern PLT shit like effects systems to sort of inject allocator customizations more cleanly and hopefully avoid fat pointers, maybe..... idk.

      • 2 weeks ago
        Anonymous

        >yeah it's got good features, but it just doesn't seem as polished as rust, makes sense for pre 1.0 but still, it's been in development for 8+ years now.
        is took rust 9 years to get to 1.0 and that was with corporate backing and many more full time employees. But yeah also zig is taking on much much more things than rust. Even doing things like reverse engineering the mac linker to create their own

  3. 2 weeks ago
    Anonymous

    If you're going back to rust then zig wasn't for you, it's like c but more explicit and with better build tools. Pretty good from the small things I've done, keeping an eye out for the first full release.

  4. 2 weeks ago
    Anonymous

    I use zig as a portable c(++) toolchain and linker. that's basically it. It's basically the most easy to use one and it allows me to fine grain target GNU ABI versions so I can still remain on NixOS and target EL7 garbage fire machines.
    >b-but what about zig the language?
    it's shit.

    • 2 weeks ago
      Anonymous

      >I use zig as a portable c(++) toolchain and linker.
      explain

      • 2 weeks ago
        Anonymous

        zig cc
        if you're a rust user, there are cargo plugins like cargo-zigbuild that make it easy to use zig for this use case, target specific glibc abis, musl builds without needing musl-gcc or whatever available and more.

      • 2 weeks ago
        Anonymous

        This is surprisingly common in the real world. A lot of companies are using Zig as a C/C++ toolchain despite not using the language itself for anything. It's not something you hear about often because it's all internal so the source is pretty much my ass but I can tell you it happens.

  5. 2 weeks ago
    Anonymous

    also, you can use zig on Windows to cross compile to leenucks, but because Windows is shit, you'll probably run into bugs when linking over 9000 objects because of command line length limits. NixOS on WSL2 has mostly solved my Winshit problems though, so whatever. Also Windows sucks and I question why companies still use it when no one doing real work in the field of software dev actually uses it outside of Visual C++ and C# cuckolds.

    • 2 weeks ago
      Anonymous

      >but because Windows is shit, you'll probably run into bugs when linking over 9000 objects because of command line length limits
      this is not a problem, the zig compiler writes and passes a response file when the command line gets too long

  6. 2 weeks ago
    Anonymous

    Contrarian language built on top of autistic(not in a good way) principles, completely detached from the practicability. it is designed to appeal to unemployed, dunning kruger driven subset of C programmers who couldn't comprehend any abstraction above pointers and made it into their identity. Zig "programmers" never actually program anything. If you go to any zig thread, you will never see anyone discussing their projects, code or problems related to it. All ziggers ever do is just start language wars and bait people into looking into their beloved lang.
    Also zig compiler still have critical issue that miscompiles normal code at random and still no one has even any idea how to fix it.

    • 2 weeks ago
      Anonymous

      anything that relies on llvm is inherently unsecure tho

      • 2 weeks ago
        Anonymous

        Why is that? Most software in the world was built using it

        • 2 weeks ago
          Anonymous

          llvm can copy your data around as it sees fit and you won't ever know about it
          pretty big problem for cryptography
          t. forced to write custom context switching in assembly to zero entire stack frame before function returns

          • 2 weeks ago
            Anonymous

            use fcontext, also it's seriously annoying that c/posix have not defined a standard way to do user space context switches, that's the only reason llvm screws up

          • 2 weeks ago
            Anonymous

            the irony is C++ has coroutines, but they're so shit, people just hand write their own anyhow.

          • 2 weeks ago
            Anonymous

            Interesting, im a backend webshitter and i wanna learn a low level language to enrich my mind, would you recommend c or cpp? Any ideas for cool fields to get into? Binary exploitation seems interesting but im pretty clueless about it all

          • 2 weeks ago
            Anonymous

            NTA but learn C and if you want to go further, consider Rust. It is much better suited for doing hobby stuff and will actually force good coding practices on you.

          • 2 weeks ago
            Anonymous

            I dont really feel like taking a gamble with rust ill learn it when its big and whatever i choose will be a good base for it
            No reason to jump into it i find it pretty complicated to work with and currently its still hard to find a lot of examples for stuff you wanna do
            I think rust is cool just not gonna jump into the hype train yet

          • 2 weeks ago
            Anonymous

            NTA but learn C and if you want to go further, consider Rust. It is much better suited for doing hobby stuff and will actually force good coding practices on you.

            I dont really feel like taking a gamble with rust ill learn it when its big and whatever i choose will be a good base for it
            No reason to jump into it i find it pretty complicated to work with and currently its still hard to find a lot of examples for stuff you wanna do
            I think rust is cool just not gonna jump into the hype train yet

            msvc doesn't support inline assembly on x64, whereas rust does
            so if you use C/C++ you have to convert your assembly into bytes first or just slap an extern on it and figure out how to build it
            but when you really get down to it, none of these languages actually let you do what you want to do
            guard rails everywhere because some butthole decided that X is a bad idea so they try to stop you from doing X
            just let me be a naughty boy ffs

      • 2 weeks ago
        Anonymous

        don't say that to the rust trannies

  7. 2 weeks ago
    Anonymous

    it's pretty cool but only if they could stop fricking breaking everything each release it would be great.

  8. 2 weeks ago
    Anonymous

    I like it but they've got to make the package manager easier to use.

  9. 2 weeks ago
    Anonymous

    you can grep for buildins if they are prefixed with @ thats the only reason same reason for macros having ! in rust. I find zig is very nice but I would personally never learn it until a 1.0 version is released the time you waste could be spent better elsewhere. Of course learning a language is enjoyable itself too Hare was a nice concept for example.
    I do like reading blog posts about zig those are often quite nice and introduce interesting mechanics.

  10. 2 weeks ago
    Anonymous

    reminder that andrew is actually a total midwit, borderline dimwit
    https://andrewkelley.me/post/the-techno-optimist-manifesto.html
    >this is guy in charge of your "very opinionated" language
    no thanks honestly. I'm not even a zig hater I have attempted to use it for projects but I don't see a future if someone this stupid is in that much control

    • 2 weeks ago
      Anonymous

      >2023
      well I would have let it slide if it was in 2012 or w/e when he was young but now ngl but that's kinda cringe.

    • 2 weeks ago
      Anonymous

      reminder that he has a wife and his wiener remains unsevered and his blood stream estrogen-free, which sadly can't be said for you nor the creator of your favorite language

  11. 2 weeks ago
    Anonymous

    for me, it's Odin.

  12. 2 weeks ago
    Anonymous

    The best thing about Zig is the toolchain and compiler. So I end up just writing C and C++ anyway

  13. 2 weeks ago
    Anonymous

    Zig is the white man's language. Respond with ZIG HEIL if you agree.

Your email address will not be published. Required fields are marked *