Re:C – Preliminary C2x Charter
by jcranmer on Thursday March 17, 2016 @11:59AM
(#11305175)
auto is already a keyword in C11, a type of storage specifier (like static or register).
[ Parent
| on HN ]
From <http://www.seebs.net/faqs/c-iaq.html#section-1>:
1.8: What's the auto keyword good for?
Declaring vehicles.
This is inherited from early Lisp implementations, where it was common to define a
struct car { ... };
which would get cumbersome to type.Yes, that's exactly why they'd use _Auto and a header to redefine the keyword. Existing code that does auto x = 3; (implicit int type) wouldn't break, but #include <stdauto.h> auto x = 4.2f; would be the new meaning.