5 ms·
You type about the same number of characters. Now imagine you wanted to declare the value to be immutable.
by melling 4y ago
You type about the same number of characters. Now imagine you wanted to declare the value to be immutable.
- TinkersW 4y agoIts 5 extra characters actually.. because any sensible C++ project has i32 etc defined. The type omission version isn't very useful, as this type of code is difficult to read later. Generally end up regretting using auto, and end up converting it to the actual type, except with iterators or nasty templates.
- deadbeeves 4y agoThat hasn't been my experience, personally. In fact, sometimes I wish decltype was easier to use, to declare type dependencies.
- hbossy 4y agoThat's only true because they used build-in int type. Why would I prefer to use: var inst : MyClass; over MyClass inst;