style question. In Java 8 Optional is recommended to be used a return value only:
In Rust I also use Option as a return value. But there are also cod examples in some projects (e.g. using the new “constructor”) that use Option as an optional parameter.
In Scala Option is also sometimes used as a parameter.
I’ve had this discussion with several Java and Scala developers and often people have strong preferences.
Are there any recommend best practices for Rust? Should Option be restricted to return values?