3 ms·
I'm confused about this list of complaints What is verbose about declaring arrays of structs? Arrays are fundamentally different than vectors, the same is tru
by qppo 6y ago
I'm confused about this list of complaints
What is verbose about declaring arrays of structs?
Arrays are fundamentally different than vectors, the same is true in Rust as in C++.
Types are only inferred for variable declaration, that works for closures too. You can't have an inferred type in a struct declaration either. It doesn't make sense for a function declaration imho, and having worked in languages that do it - I hate it. Horrible practice to drop type args from functions.
I think method chaining is really helpful, particularly the builder pattern. It's also supremely useful for abstracted logic or patterns like iterator combinatory, something that you don't find as cleanly in other systems languages.
Not sure what you mean about traits being scattered? They're interfaces like a pure virtual base class - implementing them is very similar to implementing a base class in C++. Except you can use generic arguments for implementations which makes for some really expressive mechanisms for abstraction.