Comment by musicale
6 months ago
I just wish they hadn't repurposed the old "auto" keyword from C and had used a new keyword like "var" or "let".
#define var auto
#define let auto
6 months ago
I just wish they hadn't repurposed the old "auto" keyword from C and had used a new keyword like "var" or "let".
#define var auto
#define let auto
If we're going that route, how about
I was thinking of having one or the other, but let as the const form is appealing. ;-)
Given how important backwards compatibility is for C++, it's either take over a basically unused keyword or come up with something so weird that would never appear in existing code.
Java solved this by making var a reserved type, not a keyword, but I don't know if that's feasible for C++.