Skip to content

Comment on Wrench Embedded Interpreterparent

Comments

Yeah, I've never understood how people can find dynamic typing "simple and easy to use", types are wonderful for catching errors and documenting the code and makes refactoring much easier - I even avoid auto/var/type interference as much as possible because I like seeing what types things are.

Consider that for many, things like Perl and Python were alternatives to using C, where the type system didn't always do a lot to help you.

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.