Comment

Comment by gwenzek

Very nice read.

I agree with the author that Zig should improve a bit the readability of integer and vector arithmetics.

Small tips is to use more lines.

  fn addOffset(base: u16, off: u8) u16 {
    const ibase: i16 = @bitcast(base);
    const ioff: i8 = @bitcast(off);
    return @bitCast(ibase +% ioff);
}
parent gwenzek 2 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton