Hacker News new | ask | show | jobs
by llccbb 2955 days ago
Had a similar thought, but around C++.

auto types and lambda functions are the ones that come to my mind. I am sure there are more features making their way into modern C++ versions.

2 comments

Those are completely different concepts. You're confusing dynamic typing with type inference.

Dynamic typing: C# "dynamic" keyword

Type inference: C# "var" keyword, C++ "auto" keyword

auto types really don't have anything to do with dynamic typing, in fact I would argue type deduction is an important tool in making static typing more attractive. An example of dynamic typing in C++ would be std::any (although you're still limited by what you can do with the contained object of course, for better or worse).