Skip to main content
added 8 characters in body
Source Link
Robert Harvey
  • 200.7k
  • 55
  • 470
  • 683

This is where encapsulation pays off.

If you have functionality that's encapsulated in a method or class, that's written in the old MFC style, and you instantiate or call it using new-style code, it will still work, won't it? You don't ever have to look at that old code unless you need to maintain it.

Treat your old code like the black box that it's supposed to be, and you can have it both ways.


To be clear, I think you should leave your old code the way it is (it is tested and proven, after all), and write your new code using your new style. If everything is properly encapsulated, having two code styles in the same code base should not matter at all.

On a case-by-case basis, consider fixing the old-style code gradually so that it conforms to the new style guidelines. You can choose to do this when a class or method is in need of refactoring, or when you need to change its functionality.

This is where encapsulation pays off.

If you have functionality that's encapsulated in a method or class, that's written in the old MFC style, and you instantiate or call it using new-style code, it will still work, won't it? You don't ever look at that old code unless you need to maintain it.

Treat your old code like the black box that it's supposed to be, and you can have it both ways.


To be clear, I think you should leave your old code the way it is (it is tested and proven, after all), and write your new code using your new style. If everything is properly encapsulated, having two code styles in the same code base should not matter at all.

On a case-by-case basis, consider fixing the old-style code gradually so that it conforms to the new style guidelines. You can choose to do this when a class or method is in need of refactoring, or when you need to change its functionality.

This is where encapsulation pays off.

If you have functionality that's encapsulated in a method or class, that's written in the old MFC style, and you instantiate or call it using new-style code, it will still work, won't it? You don't ever have to look at that old code unless you need to maintain it.

Treat your old code like the black box that it's supposed to be, and you can have it both ways.


To be clear, I think you should leave your old code the way it is (it is tested and proven, after all), and write your new code using your new style. If everything is properly encapsulated, having two code styles in the same code base should not matter at all.

On a case-by-case basis, consider fixing the old-style code gradually so that it conforms to the new style guidelines. You can choose to do this when a class or method is in need of refactoring, or when you need to change its functionality.

added 82 characters in body
Source Link
Robert Harvey
  • 200.7k
  • 55
  • 470
  • 683

This is where encapsulation pays off.

If you have functionality that's encapsulated in a method or class, that's written in the old MFC style, and you instantiate or call it using new-style code, will it will still work, won't it? You don't ever look at that old code unless you need to maintain it.

Treat your old code like the black box that it's supposed to be, and you can have it both ways.


To be clear, I think you should leave your old code the way it is (it'sit is tested and proven, after all), and write your new code using your new style. If everything is properly encapsulated, having two code styles in the same code base should not matter at all.

On a case-by-case basis, consider fixing the old-style code gradually so that it conforms to the new style guidelines. You can choose to do this when a class or method is in need of refactoring, or when you need to change its functionality.

This is where encapsulation pays off.

If you have functionality that's encapsulated in a method or class, that's written in the old MFC style, and you instantiate or call it using new-style code, will it still work?

Treat your old code like the black box that it's supposed to be, and you can have it both ways.


To be clear, I think you should leave your old code the way it is (it's tested, after all), and write your new code using your new style. If everything is properly encapsulated, having two code styles in the same code base should not matter at all.

On a case-by-case basis, consider fixing the old-style code gradually so that it conforms to the new style guidelines. You can choose to do this when a class or method is in need of refactoring, or when you need to change its functionality.

This is where encapsulation pays off.

If you have functionality that's encapsulated in a method or class, that's written in the old MFC style, and you instantiate or call it using new-style code, it will still work, won't it? You don't ever look at that old code unless you need to maintain it.

Treat your old code like the black box that it's supposed to be, and you can have it both ways.


To be clear, I think you should leave your old code the way it is (it is tested and proven, after all), and write your new code using your new style. If everything is properly encapsulated, having two code styles in the same code base should not matter at all.

On a case-by-case basis, consider fixing the old-style code gradually so that it conforms to the new style guidelines. You can choose to do this when a class or method is in need of refactoring, or when you need to change its functionality.

added 482 characters in body
Source Link
Robert Harvey
  • 200.7k
  • 55
  • 470
  • 683

This is where encapsulation pays off.

If you have functionality that's encapsulated in a method or class, that's written in the old MVCMFC style, and you instantiate or call it using new-style code, will it still work?

Treat your old code like the black box that it's supposed to be, and you can have it both ways.


To be clear, I think you should leave your old code the way it is (it's tested, after all), and write your new code using your new style. If everything is properly encapsulated, having two code styles in the same code base should not matter at all.

On a case-by-case basis, consider fixing the old-style code gradually so that it conforms to the new style guidelines. You can choose to do this when a class or method is in need of refactoring, or when you need to change its functionality.

This is where encapsulation pays off.

If you have a method or class that's written in the old MVC style, and you instantiate or call it using new-style code, will it still work?

Treat your old code like the black box that it's supposed to be, and you can have it both ways.

This is where encapsulation pays off.

If you have functionality that's encapsulated in a method or class, that's written in the old MFC style, and you instantiate or call it using new-style code, will it still work?

Treat your old code like the black box that it's supposed to be, and you can have it both ways.


To be clear, I think you should leave your old code the way it is (it's tested, after all), and write your new code using your new style. If everything is properly encapsulated, having two code styles in the same code base should not matter at all.

On a case-by-case basis, consider fixing the old-style code gradually so that it conforms to the new style guidelines. You can choose to do this when a class or method is in need of refactoring, or when you need to change its functionality.

Source Link
Robert Harvey
  • 200.7k
  • 55
  • 470
  • 683
Loading