Why is Visual C++ lacking refactor functionality?

后端 未结 11 1310
慢半拍i
慢半拍i 2020-12-12 20:15

When programming in C++ in Visual Studio 2008, why is there no functionality like that seen in the refactor menu when using C#?

I use Rename constan

11条回答
  •  温柔的废话
    2020-12-12 21:03

    The syntax and semantics of C++ make it incredibly difficult to correctly implement refactoring functionality. It's possible to implement something relatively simple to cover 90% of the cases, but in the remaining 10% of cases that simple solution will horribly break your code by changing things you never wanted to change.

    Read http://yosefk.com/c++fqa/defective.html#defect-8 for a brief discussion of the difficulties that any refactoring code in C++ has to deal with.

    Microsoft has evidently decided to punt on this particular feature for C++, leaving it up to third-party developers to do what they can.

提交回复
热议问题