Lightly inspired by https://animaomnium.github.io/optional-if-expressions/
So we have block expressions that just bundle a bunch of expr's together and return the last one:
do
foo()
bar()
end
What if they were a no-argument closure? Then we could have nicer syntax sugar than Rust's argless closures:
quotient = (den != 0.0).then do
num / den
end
...that then makes the actual block expression have a return type of a function though, which you presumably then need to call. Hnyrn. Ugh. I do hate Rust's || expr
syntax though. Why don't we have enough types of wiggly braces in the world?
Hmm, that's an interesting option, so if I'm reading it right that makes
do: ...
a block of statements anddo (...): ...
a function. Iiiii don't hate that.(touches on the "Closure and function type syntax" part of #53.)