4 ms·
> A lack of default arguments, a lack of basic arity overloading, a lack of variadic generics, all make me not want to write Rust. I'm sorry but these are such
by adamnemecek 5y ago
> A lack of default arguments, a lack of basic arity overloading, a lack of variadic generics, all make me not want to write Rust.
I'm sorry but these are such superficial problems. I don't need overloading (arity or otherwise) since Rust kind of has overloading thanks to the traits.
Variadic generics might be necessary since C++ doesn't have a good macro system. But Rust does so you achieve it that way.
- junon 5y agoRust has an abysmal macro system that cannot be properly tooled for.
- ogogmad 5y agoI guess this is why macros aren't the be-all end-all solution to problems in language design: It's difficult to construct tooling around them. It could be argued that "functions" are a form of programming language extension that are friendlier to tools. For programming-language fascinated beginners, this could be a good way of motivating "functions" as a language feature.
- junon 5y agoI agree, and I would love to see more exploration of this in non-toy programming languages for sure.
- gefhfffh 5y agoCan you explain how variadic generics are solved by traits, please?