3 ms·
I just wish 'auto' in Cpp can be changed to 'var'. Switching between C#/JS/C++, I always end up typing var instead of auto :).
by yuniq 9y ago
I just wish 'auto' in Cpp can be changed to 'var'. Switching between C#/JS/C++, I always end up typing var instead of auto :).
- lisper 9y ago#define var auto Not that I necessarily recommend doing this.
- deleted 9y ago[deleted]
- YSFEJ4SWJUVU6 9y agoThat's very unlikely to happen, ever. (Too many "int var;" out there.)
- hermitdev 9y agoYes. Also, the name auto was chosen for a very specific reason: it was already a keyword, albeit one that was rarely used. It was deemed better to re-purpose the existing keyword that introduce a new one. New non-contextual keywords are a big deal.
- jerrre 9y agoconst var would become a nice contradiction...
- banachtarski 9y agoWhy are you using var in JS.
- vernie 9y agoWhat are you supposed to be using?
- plorkyeran 9y agolet or const. var has strange scoping rules.