Spyke

Replies

zig

Comment on

Using expectEqual

Reply in thread

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.

Comment on

What motivated you to start learning English, and how has your journey been so far?

Many reasons! Here are a few:

  • Understand technical materials better and faster. (Primary)
  • Not missing out English conversations in my country.
  • Defending myself in English arguments.

I wish my English were as good as my Mandarin. Have been practicing on Reddit for more than a year and have improved a lot since then! But still lack some basic language sense and find it challenging to express abstract concepts precisely and concisely.

ps: hmm... lemmy.world server kind of unstable

You reached the end