Re: RFC 222 (v1) Interpolation of method calls

2000-09-14 Thread Dave Rolsky

First of all, I think this is a great idea

On 14 Sep 2000, Perl6 RFC Librarian wrote:

 Are there any contexts besides double quotes ("", qq{}, "EOF") where this
 need be applied?  What about inside regexes?  And if so, left and/or right
 hand side?

Regexes are enough like double quoted strings that I think _not_
interpolating here would be confusing.  The same goes for backticks
(`)/qx, which is double-quote interpolated as well.

-dave

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




Re: RFC 188 (v1) Objects : Private keys and methods

2000-09-04 Thread Dave Rolsky

On 1 Sep 2000, Perl6 RFC Librarian wrote:

 Private entries of hashes could be Iindirectly accessed in packages
 that inherit from the entry's package, by qualifying (i.e. prefixing) the
 key with the entry's package name. For example:
 
 package Base;
 
 sub new {
 my ($class, @data) = @_;
 bless private { data = [@data] }, $class;
 }
 
 
 package SortableBase;
 use base 'Base';
 
 sub sorted {
 my ($self) = @_;
 print sort @{ $self-{Base::data} };
 }

Gack!  This is in fact the reason I'm avoiding Tie::SecureHash, which is
otherwise well suited to my needs.

If I'm several lays deep in a hierarchy it seems awfully onerous for me to
have to know which ancestor my hash keys came from.

I would find a 'protected' keyword that did the same thing but allowed
unqualified access to child classes _much_ more useful.

I think both would be best.


-dave

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







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

2000-08-24 Thread Dave Rolsky

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
==*/