3 ms·
I really, really like knowing what kind of object something is by looking at the code where it is created. I really, really like it. I find it extremely helpful
by EliRivers 12y ago
I really, really like knowing what kind of object something is by looking at the code where it is created. I really, really like it. I find it extremely helpful.
This sort of thing:
auto x = function();
is so unhelpful
I find it frustrating and an active impediment when I can look at an object being created and not know what kind of object it is. In some programming languages, knowing what kind of object something is doesn't matter so much. Not the case here.
- fafner 12y agoWhy do you need to know the exact type? Why does it matter so much for C++ but not for other languages? I mean there are templates in C++ and a lot of code even in C++98 was written not knowing the exact type and just assuming or expecting certain properties/methods to work.
- EliRivers 12y agoWhy do you need to know the exact type? Okay, YOU tell me what class functions that variable "x" has. Code isn't written just for the compiler to read.