Indeed, you will frequently find yourself assembling scripts out of many small functions.
实际上,您会经常发现,脚本往往由很多小型的函数装配而成。
This section contains a lot of small functions, each of which takes care of a bit of the annoying boilerplate that usually comes with implementing drag-and-drop functions.
本节包含很多小函数,每个函数负责在实现拖放功能时处理一些烦人的重复工作。
This is not that difficult a problem; since they are small functions, you can even include them in your own program's source whenever the underlying system doesn't provide them.
这并不是一件那么困难的事情;因为当底层系统没有提供它们时,您甚至可以将一些小函数直接包括在自己的程序源代码中。
The compiler will only inline very small functions when compiling for space.
当编译器针对空间编译时,只会内嵌非常小的函式。
Why? Small functions promote reuse.
为何?简单函数促进代码重用。
Small functions are easier to read.
简单函数更易于阅读。
Small functions are easier to maintain.
简单函数更易于维护。
Why? Small functions are easier to maintain.
为何?简单函数更易于维护。
Small functions are easier to test, especially when they do one thing and serve one purpose.
简单函数更易于测试,特别是当它们只做一件事,只为一个目的服务时。
Why? Small functions are easier to test, especially when they do one thing and serve one purpose.
为何?简单函数更易于测试,特别是当它们只做一件事,只为一个目的服务时。
Why? Small functions are easier to test, especially when they do one thing and serve one purpose.
为何?简单函数更易于测试,特别是当它们只做一件事,只为一个目的服务时。
应用推荐