A proposal for a 'monotonic indentation' rule: between any two adjacent lines, indentation may increase by exactly one unit but may decrease by any number. The author argues this single rule resolves most code formatting disputes across languages, is easy to add to existing style checkers, and produces clean, vertically aligned code. The rule is already enforced syntactically in the EO experimental language and draws parallels to Python's off-side rule.

2m read timeFrom yegor256.com
Post cover image
8.4K Impressions