|
|
|
|
|
by galangalalgol
1118 days ago
|
|
Rather than avoid type inference in c++ by removing auto, I typically specify a type on the RHS in C++. I mostly do this because it isn't that unusual for the inferred type to be something I don't want, but still kind of works. Eigen's matrix evaluator types as an example. I haven't bumped into this with rust, but I don't see any reason it couldn't be the case, it may just be luck or the culture. I don't specify types in rust unless cargo check tells me to, and vscode with rust analyzer happily annotates all the types if I want it to. |
|