Re:Why Zig when there is already C++, D, and Rust?
by mhh__ on Friday January 15, 2021 @07:41PM
(#25798662)
<< was necessary at the time
[ Parent
| on HN ]
Re:Why Zig when there is already C++, D, and Rust?
by edflsafoiewq on Friday January 15, 2021 @07:44PM
(#25798695)
Why?
Re:Why Zig when there is already C++, D, and Rust?
by mhh__ on Friday January 15, 2021 @08:22PM
(#25798962)
C++ didn't have variadic templates so passing along a stream with an operator was more ergonomic enough and typesafe.
Re:Why Zig when there is already C++, D, and Rust?
by edflsafoiewq on Friday January 15, 2021 @08:36PM
(#25799044)
I suppose you're comparing against std::format, but the question is why overloading an operator (cout << "foo") would have been necessary vs a regular member function (cout.put("foo")).