Lisp is the only language I've seen where it's idiomatic to have some locals scoped to the *middle* of a function. It's a consequence of let blocks.
It's neat, but I rarely miss it elsewhere. I'm happy with "scoped from here to the end of the block" in e.g. C or Rust.
miniblog.
Related Posts
I'm never sure how to convert words with hyphens into SCREAMING_SNAKE_CASE. For example, should built-in function be BUILT_IN_FUNCTION or BUILTIN_FUNCTION?
I'm trying to decide what program I should show on the home page of my PL.
Hello World is too simple to show much syntax. Fibonacci is OK but the reader may not know what print(fib(10)) should show.
Maybe print(greet("World")) is better? It gives you a function definition at least.
Playing with optional type signatures in Python, I realise that the return type is the most important to me.
I'd much rather have a function with only a return type instead of a function with only parameter types. It's often quick to add too.