Skimming the docs, it's interesting to see that they allow you to return values inside a void function: https://sorbet.org/docs/sigs
The value is thrown away by their signature wrappers though.
Related Posts
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.
I've been writing docs for different programming language operators (+, *, == and so on). Each one gets a separate web page.
I've suddenly realised that / is much harder! docs/+ and docs/== is fine, but docs// just doesn't work as a URL in a static site.
Any ideas?
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?