Zig programming language


  • Discourse touched me in a no-no place

    @dcon said in Zig programming language:

    @dkf said in Zig programming language:

    @Gąska said in Zig programming language:

    I've heard that some 15 years ago, many video game studios employed a technique of making release builds out of a single .cpp file that included the entire codebase, so you'd end up with one huge ass compilation unit, maximizing optimization potential.

    That's used for some libraries too (I know SQLite does it)

    For optimization? I thought that was just to make it really simple to include into a project. (In this one simple step...)

    Both. (:why_not_both:)


  • Banned

    @stoborrobots said in Zig programming language:

    I'm confused as to how

    no hidden control flow

    matches up with

    Top level declarations such as global variables are order-independent and lazily analyzed.

    Lazy analysis is about compile-time. If I understand it correctly, only the functions that are actually called are type-checked, translated etc. It's completely orthogonal to the "no hidden control flow", which is about that, if you don't see a function call, there is no function call.

    But then they have the defer keyword which allows executing code very far from where it's written and it's very ad-hoc and arbitrary and open-ended. Which to me is way more like hidden control flow than most of the stuff they're arguing against including, like destructors or operator overloading.


Log in to reply