develooper Front page | perl.perl6.language.objects | Postings from August 2000

RE: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)

From:
Myers, Dirk
Date:
August 28, 2000 12:20
Subject:
RE: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)
Message ID:
78445BA01DCED21197B400A0C9EA5F7E01E03097@exeug3
>   > (Or, was it already intended that the implementation of 'use
>   > invocant' might be some sort of compile-time macro?)

> No. I think a macro facility for Perl should be more general than just 
> whacking some code in at the start of every subroutine.

Yes.  I didn't phrase my comments well.  Sorry.

> The use invocant was proposed as a way to maintain backwards compatibility

> and yet give everyone the invocant access syntax he or she personally
favours.

Sure, but isn't this essentially a macro?  (If it *isn't*, then I'm missing
something... which could very well be the case).

What I meant to say was more along the lines of "if this could be done as a
macro, does it need to be a pragma, or could it be part of a standard macro
package?"

And, secondly, "if this *is* part of a standard macro package, wouldn't it
be cool to let it shove arbitrary code around rather than just doing
invocant access syntax?"

Dirk



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About