Re:Why Zig when there is already C++, D, and Rust?
by mcintyre1994 on Friday January 15, 2021 @06:32PM
(#25798086)
I was once trying to diagnose a performance issue in an algorithm written in Ocaml. Someone had overloaded ** to be (IIRC) 64-bit multiply. I had a momentary “gotcha in 2 seconds!” moment before realising what was happening with that one.
[ Parent
| on HN ]
Re:Why Zig when there is already C++, D, and Rust?
by andrepd on Friday January 15, 2021 @06:58PM
(#25798301)
Funny you should mention OCaml, with doesn't have operator overloading! You can only have one function with a given name in scope at any point, that includes operators. Of course you can redefine with `let (+) a b = ...`, but then you have to explicitly open that module where you want to use that redefined operator. That makes it even more clear what's going on.