Consider defaulting a var/let declaration to auto type #1495
giucam
started this conversation in
Language design
Replies: 1 comment 3 replies
-
FYI, it was considered, see proposal p0851, especially "Alternatives considered" > "Elide the type instead of using auto". |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In order to make a var/let declaration with type inference one needs to specify the type as
auto
, as in:It seems to me it would be more natural if you could just do
I think the
auto
there does not really do anything useful, while just being one more thing to type.Beta Was this translation helpful? Give feedback.
All reactions