3 ms·
auto is insane seeing as how it's already a reserved keyword in C.
by z_open 2y ago
auto is insane seeing as how it's already a reserved keyword in C.
- jcelerier 2y agoIt used to be in c++ too and I have never even heard of a conflict this caused
- eska 2y agoauto is a historic artifact for porting code from the B language to C, when everything was implicitly int but int did not exist yet. It had absolutely no use afterwards, which is why it was repurposed in C++ as well. In C23 this is done because it is very useful in combination with typeof() in macros, which is a far cry from SFINAE terrorism in C++
- ndiddy 2y agoI have never seen anyone use auto in code newer than the mid-70s, apart from C++ programmers accidentally using it in a case where it happens to work.
- pjmlp 2y agoIn the 1980's it was still around in compilers that were K&R C subsets for 16 bit home computers.