No Semicolons Needed
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
A deep dive into how 11 programming languages (Python, Go, Kotlin, Swift, JavaScript, Gleam, Lua, R, Ruby, Julia, Odin) handle optional semicolons and statement termination. The author, building a scripting language called Roto, surveys each language's approach — from lexer-based semicolon insertion (Go) to whitespace-insensitive parsing (Gleam, Lua) to indentation-based rules (Python) — analyzing tradeoffs in clarity, robustness, and error detection. The post concludes with guidelines favoring simple, explicit rules, newline-splitting parsers, and tooling to catch ambiguous cases.
Sort: