Today I learnt that Lua projects often use *3* spaces for indentation! https://github.com/luarocks/lua-style-guide/blob/master/README.md#indentation-and-formatting
I initially thought something was very wrong with editor config.
miniblog.
Related Posts
I really like pattern matching in Rust, but I find myself using it less and less.
`if let` and `let ... else` require substantially less indentation, and I often use them for Option values.
I don't miss this syntactic sugar in OCaml though. Maybe it's just because OCaml has a 2 space indent, unlike Rust's 4 space indent?
One underrated feature of Go and Julia: methods are defined without extra indentation. In e.g. Java they're inside the the class at the next indentation level.
Methods are so common and indentation is a finite resource. "Top level method" syntax is surprising at first though.
Playing with VS Code also reminds me how overloaded the tab key can be. It might do indentation, or LSP completion, or snippet completion, or Copilot completion.
In Emacs I've configured these operations on separate keys (e.g. yasnippet on SPC) which is less surprising.