While reading Keywords That Aren't (or, Comments by Another Name) by Herb Sutter I came across these lines:
That's right, some keywords are semantically equivalent to whitespace, a glorified comment.
And
We've seen why the C++ language treats keywords as reserved words, and we've seen two keywords —auto and register — that make no semantic difference whatsoever to a C++ program. Don't use them; they're just whitespace anyway, and there are faster ways to type whitespace.
If the keywords like auto
(maybe not in C++11) and register
are of no value, then why were they created and used?
Aucun commentaire:
Enregistrer un commentaire