by ogogmad · 3w ago · 0 comments
OCaml basically gives you operator overloading this way without actually doing overloading. I'm wondering why we can't have these OCaml-isms in other languages - without needing to use OCaml - which sadly comes with other commitments.
const @<+> = @import("op.zig").special_add;
const c = (a <+> b);
//syntactic sugar for @<+>(a, b)