Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
yuniq
· 8y ago · 0 comments
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 :).
Comments
[–]
lisper
8y ago
#define var auto
Not that I necessarily recommend doing this.
[–]
YSFEJ4SWJUVU6
8y ago
That's very unlikely to happen, ever. (Too many "int var;" out there.)
[–]
hermitdev
8y ago
Yes. 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.
[–]
banachtarski
8y ago
Why are you using var in JS.
[–]
vernie
8y ago
What are you supposed to be using?
[–]
plorkyeran
8y ago
let or const. var has strange scoping rules.
[–]
jerrre
8y ago
const var would become a nice contradiction...