Zig in Production - Jens Goldberg

แชร์
ฝัง

ความคิดเห็น • 10

  • @erikengheim1106
    @erikengheim1106 3 ปีที่แล้ว +47

    Interesting talk, if I was to try to summarize advantages using Zig that I can gleam from this it is:
    1. Solves problems with target embedded platforms with a lot of hardware variations thanks to great cross platform compilation.
    2. Small binary sizes in Zig is a huge benefit in the embedded space. If you got large binaries you are forced to use much more complicated architectures. E.g Go is not usable in this space because the binaries are too large.
    3. Performance. Zig gives good performance which means you avoid the need for separate servers, load balancers and other things which complicates your system.
    4. Full batteries included. This feel a lot like Go, Python etc. In that you got a standard library with all the useful stuff that people tend to need. This lets embedded programmers avoid relying on third party libraries.
    5. Zig gives sane error handling, C creates spaghetti code for error handling.
    6. No need for stuff like Docker, because you can make Zig programs that have no other dependencies. You don't even need to depend on libc. This makes it much easier to deploy on different hardware.

  • @SaHaRaSquad
    @SaHaRaSquad 2 ปีที่แล้ว +4

    23:36 "every time you have to add a library, you add pain"

  • @WorstDeveloper
    @WorstDeveloper 3 ปีที่แล้ว +10

    I don't use Rust, but I believe incremental compilations are much faster than full release compilations.
    However, maybe even the incremental compilations were slow enough for Jens.
    As a Swede it's interesting to see Zig being used in some places.

  • @MirceaIliePloscaru
    @MirceaIliePloscaru 3 ปีที่แล้ว +3

    Great talk! Glad to see production use-cases already

  • @BramSenders
    @BramSenders 3 ปีที่แล้ว +16

    I slept late and unfortunately missed the Showtime, but I still have a question for Jens: Did you have any issues in convincing your employer to use a pre-1.0 compiler in production? Also do you think there is space/opportunity for Zig in the spaces where currently standards like MISRA C are used?

    • @jensgoldberg1384
      @jensgoldberg1384 3 ปีที่แล้ว +24

      Nah, my boss gives me projects and doesn't ask questions - as long as we deliver on time.
      As for MISRA... I don't think these types of standards are very good. Half the rules are "common sense" stuff, half are dumb and counterproductive. I suspect the reason companies adopt it is that they can then say that they're doing *something*, even if it doesn't actually work. It'll also have some effect as forcing people to look extra carefully at code will make them discover bugs no matter what standard you're following. You could implement a rule like "every scope needs a comment with an emoji that represents how you feel about it" and it'd unironically improve the quality of the code more than MISRA does.

  • @technologicalwaste7612
    @technologicalwaste7612 3 ปีที่แล้ว +7

    28:30 -- The trauma is so clear on his face.

  • @skaruts
    @skaruts 3 ปีที่แล้ว +5

    As far as I know, rust only takes its sweet time the first time. But it takes an absurdly long while indeed. Another problem I had is that my 5 or 6 test projects take up over 2GBs disk space... like wtf?
    Personally, I also find the syntax way convoluted and cryptic.

  • @Narblo
    @Narblo 3 ปีที่แล้ว +1

    I love zig but I think its syntax can be impproved as go to be a lot easier to read

  • @hank-uh1zq
    @hank-uh1zq 3 ปีที่แล้ว +1

    C and Forth