Wed May 28 11:04:36 AM +08 2025 #29

What is good style? Good style in any language consists of code that is: Understandable Reusable Extensible Efficient Easy to develop and debug It also helps ensure correctness, robustness, and compatibility. Maxims of good style are: Be explicit Be specific Be concise Be consistent Be helpful (anticipate the reader's needs) Be conventional (don't be obscure) Build abstractions at a usable level Allow tools to interact (referential transparency) Know the context when reading code: Who wrote it and when? What were the business needs? What other factors contributed to the design decisions?