"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearZI
Ziglang 1y ago
Jump
Using expectEqual
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearXZ
    xzqtlmn
    1y ago 100%

    If we look at the signature expectEqual(expected: anytype, actual: @TypeOf(expected)) !void, notice that the second arg's type depends on the first arg's type.

    To avoid using @as coercion, we can just swap the passing arguments. comptime_int can be inferred as i64, not the other way around. And that makes sense because literal values are unsized.

    2
  • As far as I can tell, italics are used as an alternative to quotes or double quotes. However, there is one usage that perplexes me: when they're used on auxiliary verbs. For example, - I didn’t even know she _had_ a boy friend. - Oh my god, they really _can_ write! - If you _can_ do that, you should. - But what I _can_ guarantee is that... I've seen this kind of writing on Reddit and Lemmy for quite a while, but still can't grasp it: when and how?

    2
    0