14 votes

Zig 0.16.0 release notes

2 comments

  1. [2]
    ogre
    Link
    Oh FINALLY. This is (in my opinion) one of the ugliest parts of game/graphics programming in zig. There’s an example in the release notes but I think a before & after makes it clearer: Before:...

    Unary Float Builtins Forward Result Type

    Oh FINALLY. This is (in my opinion) one of the ugliest parts of game/graphics programming in zig. There’s an example in the release notes but I think a before & after makes it clearer:

    Before:

    const foo: f64 = @sqrt(@as(f64, @floatFromInt(x)));
    

    After:

    const foo: f64 = @sqrt(@floatFromInt(x));
    
    15 votes
    1. kari
      Link Parent
      Oh that’s so much better. It’ll even help with my window manager some just w.r.t. scaling certain buffers.

      Oh that’s so much better. It’ll even help with my window manager some just w.r.t. scaling certain buffers.

      3 votes