I'm trying to decide the best voice for PL documentation.
Passive: "`let` can be used with destructuring."
Reader focused: "You can use `let` with destructuring."
Describing the PL: "FooLang supports destructuring with `let`."
Anyone have opinions or best practices?
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?
I'm designing a programming language and trying to decide the type of `let x = 1;`. Should it be Unit or Int?
Advantage of Int: really convenient when evaluating snippets in a REPL.
Advantage of Unit: It's much less confusing when type inference runs on an incomplete function.
What are the most popular languages that have used an AST walker for their implementation?
I know Ruby used to do this, but there must be others.
(I'm interested in the lowest PL speed that users will tolerate if you have awesome features.)