Closed
Description
Options should not drastically change the return type of a function. For example, you should not have an option that changes the return type. Fictional API:
Integer.parse("13")
=> {13, ""}
Integer.parse("13", discard_rest: true)
=> 13
Because options are optional and sometimes set dynamically, if they change the return type it may be hard to understand what the function actually returns. It is best to introduce a separate function, like Integer.parse_no_rest
.