The second piece of common wisdom when it comes to methods is that they should be short. In this chapter, we will go over advantages and disadvantages of short methods and why larger methods have their place, and we’ll talk about when you should split a larger method into shorter ones.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

How Long Should Methods Be: Length, Depth, and Subtasks

  • Pablo Gonzalez

摘要

The second piece of common wisdom when it comes to methods is that they should be short. In this chapter, we will go over advantages and disadvantages of short methods and why larger methods have their place, and we’ll talk about when you should split a larger method into shorter ones.