About Blocks And Indenting

About Blocks and Indenting

About Blocks and Indenting

Intro

If、else、while及其它敘述都應該只有一行,那行程式通常是函式呼叫敘述。
不僅能維持private function的簡短,因在block裡被呼叫的函式,具備不
錯的函式名稱來描述意圖,能增添類似文件說明的價值。

function不應該大到包含巢狀結構。因此,function裡的縮排程度不應該大
過一或兩層。當然,這會使得function更容易閱讀和理解。