Komari Spaghetti

Results 98 comments of Komari Spaghetti

Basically, the problem here is that `list.items(.value)` returns a slice that points to address `0x0`: ```zig const std = @import("std"); const testing = std.testing; test { const S = struct...

Also of note is this: https://github.com/ziglang/zig/issues/1831#issuecomment-722129239

@Meai1 I'm not sure how this solves the issue. We're talking about allowing two names `A` and `B`, to have the same underlying type (`usize` or something else) but disallow...

If we're not gonna support the operators for the type, then we are pretty close to be able to have this in userland: ```rust const std = @import("std"); const debug...

@andrewrk Aaah, nice!

I'll add something related to this, that I've hit before. C users also uses `enum`s for flags, so sometimes you'll see this in headers: ```cpp enum flags { A =...

Hi. This seems like a subset of what I suggested in [this comment](https://github.com/Hejsil/zig-bench/pull/13#issuecomment-1014812910), which I would rather do than this. It's not something I've taken the time to do though

Does `Omittable(@TypeOf(null))` not work for this usecase? `@TypeOf(null)` gives you a zero sized type that can only be the value `null`: ```zig test { const S = struct { f:...

On a sidenote, this is kinda funny: ``` src/main.zig:7:44: error: no size available for type '@TypeOf(null)' try std.testing.expectEqual(0, @sizeOf(@TypeOf(null))); ``` But `@sizeOf(S)` return `0`. Seems like a bug. Is there...

Aah no, you cannot have fields of type `@TypeOf(null)` at runtime. My bad: ```zig test { const S = struct { f: @TypeOf(null), }; var s = S{ .f =...