code readability
Two quick definitions, from one of the best courses I've taken¹:
- Syntax: The rules that say what counts as valid code. Punctuation, keywords, structure.
- Semantics: The meaning of that code. What it does, what it represents.
So what's code readability?
Readability is syntax that makes semantics obvious.
- It's not about imperative vs functional.
- It's not about tabs, spaces, or where the braces go.
- It's about clarity.
- It's about mutability, iterating, cloning.
- It's about moving or cloning values.
- It's about understanding if we're dealing with a value or a reference.
A good language is readable. A readable language makes semantics obvious. A good programmer encourages that kind of readability.
¹ CS3110 — Cornell's OCaml course.