Re: RFC 319 (v1) Transparently integrate Ctie

2000-09-26 Thread Nathan Wiger
I'm kind of curious to know what you think would happen with the following. I've commented where I'm confident... interface Number; sub TIESCALAR; sub STORE; sub FETCH; package integer implements Number; # I really like this notation Tangentially, yes, it is nice

Re: RFC 265 (v1) Interface polymorphism considered lovely

2000-09-23 Thread Nathan Wiger
package Doggie; sub isborn { bless { @_ }, self; # ;-) } sub scratches ($\@;@) { ... } package Doggie::Cute; use base 'Doggie'; use interface 'Pet'; # Our base class is 'Doggie', which does not use the 'Pet' #

Re: RFC 200 (v2) Objects: Revamp tie to support extensibility(Massive tie changes)

2000-09-20 Thread Nathan Wiger
Damian Conway wrote: I didn't see any mention of my plea that Ctie should pass the original variable being tied as one of its arguments. :-( That's because it's a dumb idea!! **Kidding!** I forgot about this, sorry. I'll add it to the next version ;-) my $x = 10; tie

Re: FYI: Ruby 1.6.0 - An object-oriented language for quick and easy programming

2000-09-19 Thread Nathan Wiger
What sets Ruby apart is a clean and consistent language design where everything is an object. I like this part. Assuming I ever finish my last RFC I'd like Perl to have embedded objects as well. The difference being Perl's wouldn't get in the way, unlike Python's. Of particular interest seems

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

2000-09-19 Thread Nathan Wiger
This RFC proposes two new keywords -- Cprivate and Cpublic -- that limit the accessibility of keys in a hash, and of methods. I still think these should be attributes across the board: my $hash{$key} : private = $val; my @hash{qw(_name _rank _snum)} : public; sub dostuff : private {

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

2000-09-19 Thread Nathan Wiger
Damian Conway wrote: The problem with specifying them as attributes is that I do not believe there is any way (or even any proposed way) of applying attributes to a hash entrie or a hash slice, nor is there any way of *retrospectively* applying an attribute to a hash that has already been

Re: RFC 163 (v2) Objects: Autoaccessors for object data structures

2000-09-18 Thread Nathan Wiger
How about also just ":access" to do both? It would seem to be the most common case. I was trying to conserve keywords, but I'm not opposed to this. =head2 Mixing autoaccessors and real subs I really don't see how this is necessary. If you have to write a custom accessor, you might as

Re: RFC 254 (v1) Class Collections: Provide the ability to overload classes

2000-09-18 Thread Nathan Wiger
[From DBI-connect()] # XXX this is inelegant but practical in the short term, sigh. if ($installed_rootclass{$class}) { $dbh-{RootClass} = $class; bless $dbh = $class.'::db'; my ($outer, $inner) = DBI::_handles($dbh); bless $inner = $class.'::db';

Re: RFC 163 (v2) Objects: Autoaccessors for object data structures

2000-09-18 Thread Nathan Wiger
All- As the sublist chair, I politely ask you to please table this discussion. Time is running short and this is really a digression. Glenn, if you have a proposal, please put one together in RFC format and post it to -objects. -Nate

Specific RFC comments for -objects

2000-09-18 Thread Nathan Wiger
All- In an attempt to nudge things in the right direction (wrap-up), I've gone through and made some specific comments on RFC's. These are my opinions from monitoring the discussions on this list since its inception. I do not claim to be infallible, but feel I have a pretty good idea of what's

Re: RFC - Interpolation of method calls

2000-09-17 Thread Nathan Wiger
Tom Christiansen wrote: print "Today's weather will be $weather-temp degrees and sunny."; So, the - operator is supposed to get expanded in dq strings, eh? It already does, or at least appears to to users: print "Today's weather will be $weather-{temp} degrees and sunny.";

Re: RFC - Interpolation of method calls

2000-09-14 Thread Nathan Wiger
This topic is actually covered, albeit far less in-depth and lumped with an unrelated change, by Nathan Wiger's RFC 103, just in case you weren't aware. Yeah, I've got to split those up. I was trying cut down on the flood of RFC's that poor Larry has to sift through :-(, but they are both

Re: Draft RFC: new pragma: Cuse namespace

2000-09-14 Thread Nathan Wiger
Nathan Wiger wrote: use namespace 'Big::Long::Prefix'; my ::Class $object = ::Class-new; Assuming repairing :: precedence is a reality I don't think this proposal buys us anything. backtracking...That being said, I'm not necessarily against it. I'm just against bloat. I hadn't

Re: RFC 189 (v2) Objects : Hierarchical calls to initializers and destructors

2000-09-14 Thread Nathan Wiger
=head2 The CBUILD method =head3 The CREBUILD method Hey! You left out the alternative names NEW / RENEW and BLESS / REBLESS that we all like! :-( -Nate

Re: Draft RFC: new pragma: Cuse namespace

2000-09-13 Thread Nathan Wiger
use namespace 'Big::Long::Prefix'; my ::Class $object = ::Class-new; Anyone mentioned that this: $SHORT = 'Some::Huge::Obnoxious::Ridiculous::Term'; $SHORT-member; $stuff = new $SHORT; Already works? The only problem is that this: $SHORT::stuff(@args); Doesn't, but this

Re: RFC 101 (v2) Handlers and Pseudo-classes

2000-09-13 Thread Nathan Wiger
[added -io cross-post] John Porter wrote: Just MHO, but I don't think this is the kind of thing that should go in the core. Just MHO. I think I agree. Just to clarify, the only reason it's an RFC and not just a Perl 5 module is because RFC 14 (the one on a new open()) relies on a handler

Re: RFC 200 (v1) Objects: Revamp tie to support extensibility (Massive tie changes)

2000-09-10 Thread Nathan Wiger
Michael Fowler wrote: =head3 Merge CTIESCALAR, CTIEHASH, and CTIEARRAY into CTIE I'm not so sure about this. I'm not either anymore. This will probably be removed from the next version. Instead, this RFC proposes that Ctie's operation become much more fundamental, simply translating

Re: RFC 200 (v1) Objects: Revamp tie to support extensibility (Massive tie changes)

2000-09-10 Thread Nathan Wiger
Michael G Schwern wrote: sub lock { print "Hello!" } $trans = new Lock::Ness; lock $trans; # $trans-lock That's not right. You're correct. Sorry for not double-checking my examples. the same reasons I've already pointed out. You don't want adding a method to a class to

Re: RFC 193 (v1) Objects : Core support for method delegation

2000-09-05 Thread Nathan Wiger
Damian Conway wrote: attr3 = [ALL] It was (and is) a good suggestion. I suspect however that it should be attr3 = [__ALL__] Any consideration given to the :all export-like tag? attr3 = [:all]# could be uppercase too -Nate

Non-inheritable and cascading methods

2000-09-04 Thread Nathan Wiger
All- I've been toying with this for a while, and I'm looking for others' input. I'm not RFC'ing it yet because (a) I already have 25 others to maintain and (b) I'm not sure if this might be covered by "my sub" or one of Damian's future RFC's. Currently, there are two big problems in defining

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

2000-09-04 Thread Nathan Wiger
private $hash{key}; private $hash{$key}; private $hashref-{key}; or to a hash slice: private @hash{qw(_name _rank _snum)}; or to a complete hash (either directly, or via a reference): private %hash; private { _name = "demo", _rank =

Re: RFC 189 (v1) Objects : Hierarchical calls to initializers and destructors

2000-09-02 Thread Nathan Wiger
Michael G Schwern wrote: Derived classes will never have to override a base's implementation, and all member variables should be private, and everyone will always use an accessor, and the UN will bring about world peace, and as long as I'm wishing for a perfect world, I'd like a pony. ;)

Re: RFC 189 (v1) Objects : Hierarchical calls to initializers anddestructors

2000-09-01 Thread Nathan Wiger
I haven't commented on RFC 171 because I assumed it would be shot down quickly by the Major Contibutors(tm), but let me just say now that I'm firmly in this camp: Funny, I don't see much difference between RFC 171 and this RFC: 171: constructor called on object creation 189:

Re: RFC 171 (v1) my Dog $spot should call a constructor implicitly

2000-08-30 Thread Nathan Wiger
What, then, happens to the following code: my Dog $spot; if ($age 12) { $spot = new Doberman(); } else { $spot = new Corgi(); } This is a tricky case that deserves a lot of attention, but not exactly as written. Imagine this code block: my int ($x, $y, $z) = (4, 5, 6);

Re: RFC 161 (v2) OO Integration/Migration Path

2000-08-29 Thread Nathan Wiger
"Randal L. Schwartz" wrote: That's my first gut reaction to this proposal. "If you like Python, you know where to find it, but let us have some primitive data types in Perl that act primitive so we can optimize things." Well, we're on a border here. What this RFC is really referring to is

Re: RFC 161 (v2) OO Integration/Migration Path

2000-08-27 Thread Nathan Wiger
Nathan Torkington wrote: Are you proposing making even "normal" scalar, hash, and array access go through these methods? Wouldn't that slow everything way down? Glad you brought this up, Nat! I would say "yes and no". The reason I'd say this is because Dan S. and the internals guys are

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-25 Thread Nathan Wiger
/ =head1 TITLE True Polymorphic Objects =head1 VERSION Maintainer: Nathan Wiger [EMAIL PROTECTED] Date: 25 Aug 2000 Mailing List: [EMAIL PROTECTED] Version: 1 Number: 159 Status: Developing =head1 ABSTRACT Currently, using objects in numeric and string contexts

PLEASE DISCUSS ON -objects!! (was Re: RFC 161 (v1) OO Integration/Migration Path)

2000-08-25 Thread Nathan Wiger
Please discuss this RFC on the -objects sublist. Thanks. Matt, you should probably update the Mailist List to perl6-language-objects for v2. -Nate Perl6 RFC Librarian wrote: This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE OO

Re: RFC for $ME class variable (was Re: RFC 124 (v1) Sort order forany hash)

2000-08-23 Thread Nathan Wiger
You can have your cake, but not force us to eat it too... Like $AUTOLOAD, $ME would be dynamically scoped: The first time I saw the bareword "self" keyword I almost wet myself in horror, but I would say that $AUTOLOAD is a disaster that should not be repeated. And that's the way that this