Earlier quoted context omitted.
I also find objections like the "createBunnyOrToaster" antipattern to be really, really uncompelling. You don't need a static type system to make sure that your functions are sane and consistent, and you don't have to be John Resig either. First of all, put a comment at the top of your function that says what to expect about the return value. You should be doing this anyway because the return type alone is often not…
put a comment at the top of your function that says what to expect about the return value. Great, so now the documentation for the function will promise to return a motorcycle, but instead return either a bunny or a toaster. There are lies, damn lies, and boilerplate code comments.
Not if you follow the second part of my above advice.
>There are lies, damn lies, and boilerplate code comments.
Since when is a comment that explains what a function does "boilerplate"? I think you are confused.