You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
I also added this smell to the catalog. I've tried to detail the code examples a little more so the internal structure of the smell is more clear. What do you think?
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:
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
.The text was updated successfully, but these errors were encountered: