About Blocks And Indenting Posted on 2024-04-05 Edited on 2024-07-03 In CleanCode Views: Disqus: Symbols count in article: 229 Reading time ≈ 1 mins.About Blocks and IndentingAbout Blocks and IndentingIntroIf、else、while及其它敘述都應該只有一行,那行程式通常是函式呼叫敘述。不僅能維持private function的簡短,因在block裡被呼叫的函式,具備不錯的函式名稱來描述意圖,能增添類似文件說明的價值。function不應該大到包含巢狀結構。因此,function裡的縮排程度不應該大過一或兩層。當然,這會使得function更容易閱讀和理解。