T O P I C R E V I E W |
dango |
Posted - Jan 21 2007 : 10:02:46 AM When I am refactoring code I often would like to take an expression and assign it to a variable.
if (a && b) { foo(a && b); }
I would highlight a && b pick a new refactoring: introduce variable and add in the dialog bool isAFilbert. Code changes to:
bool isAFilbert = a && b; if (isAFilbert) { foo(isAFilbert); }
I think sometimes it would also be useful to do the opposite: Expand variable expression.
|
2 L A T E S T R E P L I E S (Newest First) |
sean |
Posted - Nov 07 2014 : 10:07:27 AM case=1492 is implemented in build 2052 |
feline |
Posted - Jan 22 2007 : 07:13:59 AM Introducing a new variable like this is in our list of things to do, when we find the time
case=1492 |