3 ms·
Swift solves the "auto" issue pretty nicely - with the help of the IDE: let x = someFunction() Alt-click on x and it shows the type. Otherwise, as you say, t
by justsaysmthng 10y ago
Swift solves the "auto" issue pretty nicely - with the help of the IDE:
let x = someFunction()
Alt-click on x and it shows the type.
Otherwise, as you say, the code becomes very confusing and I abstain from auto except in cases where the type is clearly obvious.
- jesperhh 10y agoVisual Studio shows the type of auto on hover.
- fish2000 10y ago… also one of the forthcoming Clang projects is a static-analysis tool (á la `clang-format`) for replacing any `auto` decls with the actual typename, so you can write lazy code without appearing unscrupulous at code reviews