On Tue, 22 Aug 2000, David L. Nicol wrote:
> Yes, that's pretty much it. More opportunity to be lazy, but only
> if you know how. This way the authors of methods never have to fiddle
> with checking ever again. And users who call methods like subroutines
> had better know what they are doing or they are unwisely meddling in the
> affairs of wizards.
Well - works great as long as you only have the case of people
accidently or due to laziness calling methods as subs but there's also the
case where I might want to offer both interfaces - then I run into trouble
if the method author does not even know wether its procedural or OO.
What if e.g. the procedural call will result in the usage of some default
values where the OO call will use the state of the object? Maybe I
actually want to use the default value without creating another object?
What happends in an environment where multiple author work on the same
program running in the same process and they probably prefer different
styles? What if I have semi-trusted code which is secure as long as that
code can only access certain objects - such an approach might allow to
acquire "foreign" object handles?
These are loads of side effects. Such a feature is probably ok if it's
optional for a method but not by default...
--
Markus Peter - [EMAIL PROTECTED]