Expected Common Misunderstanding (was: bug: run/3 bug)
Dean Tribble
tribble@agorics.com
Mon, 07 Jun 1999 08:36:00 -0700
>This build3 is both a 2-arity function and a 3-arity function, in that it
>has both arities of "run" method. Though it has both behaviors, there's
>only one object, and both calls to build3 are invoking that same object.
>
>Unless someone has a super-clever idea, I'd guess we are simply stuck with
>people often falling into this trap, and all we can do is explain the issue
>well.
The super-clever idea is just more diagnostics. In the example, the
compiler could have issued a warning that the build3 function was being
redefined (and let it proceed). It could also have complained that the
build3/3 call wasn't defined (again, while accepting the definition). This
latter analysis is obviously harder! Having the redefinition one would be
very useful, however.