From: Dan Sugalski [mailto:[EMAIL PROTECTED]]
> At 10:32 AM 9/4/2001 +0100, Piers Cawley wrote:
> > > * Methods get their parameters passed in as a list in
> > > * PMC register 0, unless we can unambiguously figure
> > > * out their prototype at compilation time
> >
> >Will the subroutine know how it was called? (ie: Through method
> >dispatch or through straightforward symbol table lookup. I'm really
> >hoping the answer to this is 'yes'.) Or will methods and subroutines
> >be distinct now?
>
> I suppose we could, and I don't know.
>
> Can you see any use of a sub knowing it was called via a method call?
So that attributes which cause code to be executed before or after a
subroutine implementation's execution might behave differently depending on
whether the sub were executed as a function or a method?
On the language list some time ago, Damian mentioned Pre and Post subroutine
handlers that might act differently depending upon whether the subroutine
was called as a function or a method. I.e., on methods they would act like
Design-By-Contract conditions: providing for conditional assertions, but
unable to modify pre/post execution or the argument list. Whereas 'Pre' and
'Post' attributes on functions might be used to massage arguments into a
required format, supply clean-up code, or even replace the implementation.
Certainly this could be avoided by naming the properties differently... but
perhaps there are other uses that might be similar?