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

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

From:
Dave Rolsky
Date:
August 24, 2000 11:08
Subject:
Re: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)
Message ID:
Pine.LNX.4.21.0008241221000.1036-100000@urth.org
On Thu, 24 Aug 2000, Hildo Biersma wrote:

> Don't impose your religion on others.  If people want 'this' instead of
> 'self', that should be just fine.
> 
> It should be pretty easy to define the appropriate $ME-reader like this:
> 
>   use ObjectStyle 'self';
> 
> or
> 
>   use ObjectStyle 'Java';
> 
> for the appropriate, per-module scoped, definitions for:
> 
> - self vs this
> - super vs SUPER vs base vs parent
> - DESTROY vs finalize vs destructor
> - default of 'private', 'protected' or 'public'
> 
> and any others we can come up with...

I'm all for TMTOWTDOI but I really object to this idea.  I have enough to
deal with when reading other's modules without having to look for DESTROY
*or* destroy *or* finalize *or* I_am_dying *or* whatever.

Perl needs to walk a line between being flexible and remaining a language
where I can download something from CPAN and have some chance of
understanding it.

Maybe the following would be ok:

use self;  # otherwise object is in @_


That I could live with.  4 different sets of object names and special sub
names would kill me.


-dave

/*==================
www.urth.org
We await the New Sun
==================*/




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