Does changing the name of a variable throughout your code base just ask for disaster?

Suppose you decide to change the name to a Frack overflow.

Now in your code, you already have dozens of objects and variables and selectors with some change to the name "Stack". You want them to now be replaced with "Frack".

So my question is: would you decide to run your entire code base through a regular expression filter and change all these names? Or will you let them be?

+3
source share
9 answers

I would use the rename function of a good IDE to do this for me.

+9
source

It really depends.

, ++, , , - . , , , , - , .

flex -, , , Adobe AS3. , , , hibernate ( java webapp backend) . , flex , "" IDE.

, , OCD . , , , .

+2

: ? / , .

, .

+1

, , , , . : , .

+1

, , , , , , Resharper , - .

+1

, Resharper JetBrains CodeRush Refactor! DevExpress. . ! Visual Studio VB. Resharper, .

+1

(, svn, git, bazar, mercurial ..), .

- " " IDE, ( ) ( ).

- , .

+1

, , refactoring. , , , , .., . , , .

, , imho . , , . , (IDE - ), .

"" , , , , .

+1

In my opinion, this requires a good excuse. When I make changes that have a large number of potential side effects in a large code base that happens from time to time, I usually look for a way to make the compiler unsuccessful in the spots that I missed. And, if possible, I try to do this step by step in order to minimize the gap.

I would not rename just for the sake of renaming.

0
source

Source: https://habr.com/ru/post/1703557/


All Articles