开发者

What are the most frequent steps an Objective-C programmer will go through to refactor his code?

开发者 https://www.devze.com 2023-01-22 16:30 出处:网络
Are there frequent processes which the programmer will go through? Or does everyone have different c开发者_开发知识库oding habits?Often when it looks like I will be repeating some code or algorithm th

Are there frequent processes which the programmer will go through? Or does everyone have different c开发者_开发知识库oding habits?


Often when it looks like I will be repeating some code or algorithm that I already have, I look for ways to avoid it.

A common one for me is to have need for a class that is similar in some way to a class I already have. I break the original class into a superclass (with the common functionality) and a derived class, and use the superclass as the basis for my second class.

0

精彩评论

暂无评论...
验证码 换一张
取 消