4 ms·
It's absolutely not "magic", it's clearly-defined, easily-understood syntactic sugar that makes code smaller, simpler, and cleaner. There is never a case where
by nknight 14y ago
It's absolutely not "magic", it's clearly-defined, easily-understood syntactic sugar that makes code smaller, simpler, and cleaner.
There is never a case where you have to wonder what the type of an "auto" variable is, it is always the return type of whatever function or method you are invoking. If you don't already know what that return type is, you won't be able to use the result anyway.
- pubby 14y agostd::initializer_list is pretty magical.
- nknight 14y agoI don't really buy that. It enables a syntax that otherwise wouldn't be possible, but so does struct. The only thing really "magical" about it is the optimizations it makes possible, but if that were your concern, it would be the first time I heard anyone complain that compiler optimization is "magical" in any negative sense.