Author |
Topic |
|
Ian Day
New Member
United Kingdom
2 Posts |
Posted - Jan 17 2014 : 03:24:34 AM
|
So, we have a fair amount of strict code standards here, one of which is restricted use of auto keyword. Many people reading the same code don't want to have to guess or wait for intellisense to catch up to their reading speed.
Anyway, its still easier to type 'auto' than a lot of declarations so it would be very useful to be able to type it that way, and then just ask VA to un-auto it into a fully qualified declaration.
Intellisense itself can tell you the variable type if you mouseover, so the info should be hanging around somewhere. Presumably after the compiler has given it a once-over. |
- Zek - Game Engine Developer at Jagex Ltd. |
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jan 20 2014 : 3:52:13 PM
|
This is an interesting idea, I have put in a feature request to see what our developers make of it. I can see how this will be helpful in a few situations, but I am not sure how widely useful it will be:
case=79735 |
zen is the art of being at one with the two'ness |
|
|
legalize
Tomato Guru
USA
119 Posts |
Posted - Jan 22 2014 : 10:12:06 PM
|
All refactorings are reversible and IMO any tool that provides a transformation in one direction with a refactoring should provide the reverse transformation as well.
Replace explicit type with auto is the dual of Replace auto with explicit type
There are times when both are useful. |
http://legalizeadulthood.wordpress.com |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jan 23 2014 : 5:30:23 PM
|
In general, yes, all refactroings are reversible, but some, like Document Method and Create Implementation don't really call for commands to remove them, since its just a case of deleting the unwanted lines.
Here, typing auto to make a new variable, and having this expanded is a very interesting idea, and a good time saver.
To convert an existing variable type into "auto", what are you thinking? Just updating the declaration line on its own? Or something more wide ranging? Updating the declaration via a refactoring would be convenient, but also almost overkill to add a refactoring command just to replace the type with the word auto. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|