Re: RFC 222 (v1) Interpolation of method calls

2000-09-15 Thread Michael Fowler
On Fri, Sep 15, 2000 at 10:58:26AM +0200, Bart Lateur wrote: MJD has a "silly module" which can tie a hash to a function: Interpolation.pm. I think I would like a special case, a specific hash that is *always* tied to a function that returns the arguments. Make it, for example, %$, %@ or %?.

Re: RFC - Interpolation of method calls

2000-09-15 Thread Michael Fowler
On Fri, Sep 15, 2000 at 07:24:39PM -0500, David L. Nicol wrote: The only decision, then, is to decide which context to use; if it deparses to concatenation then it seems logical to use scalar context. This also makes sense in that you can force list context with @{[ $weather-temp ]} if

Re: RFC - Interpolation of method calls

2000-09-14 Thread Michael Fowler
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. On Thu, Sep 14, 2000 at 03:57:41AM -0400, Michael G Schwern wrote: Methods will be run in scalar context. A method which returns a single

Re: RFC - Interpolation of method calls

2000-09-14 Thread Michael Fowler
On Thu, Sep 14, 2000 at 07:49:32AM -0700, Nathan Wiger wrote: print 'Today\'s weather will be '.join($", $weather-temp()). ' degrees and sunny.'; However if temp() calls wantarray(), the result will be FALSE (scalar). I think what he's trying to get at is that these

Re: RFC 222 (v1) Interpolation of method calls

2000-09-14 Thread Michael Fowler
On Thu, Sep 14, 2000 at 06:37:22PM -0500, David L. Nicol wrote: A possibility that does not appear in RFC222.1 is to put tho whole accessor expression inside curlies: print "Today's weather will be ${weather-temp} degrees and sunny."; which would follow the "You want something funny

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

2000-09-08 Thread Michael Fowler
On Fri, Sep 08, 2000 at 04:57:46AM -, Perl6 RFC Librarian wrote: =head3 Merge CTIESCALAR, CTIEHASH, and CTIEARRAY into CTIE In practice, people rarely make a class that Cties multiple data types through the same interface. The reason is that CSTORE, CFETCH, CDESTROY, and other methods

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

2000-09-04 Thread Michael Fowler
On Mon, Sep 04, 2000 at 10:25:37AM +0100, Piers Cawley wrote: Maybe a compromise along the lines of: my Dog $spot = LIST; # $spot = Dog-new(LIST) my Dog $patches; # $patches is undefined but we assert that # it'll be a Dog. (Whether you can do

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

2000-09-03 Thread Michael Fowler
On Sun, Sep 03, 2000 at 12:42:52PM +0200, Bart Lateur wrote: But now you're throwing away the kid with the bathwater. my Dog $spot; initially was syntax invented so that $spot was marked as only been ably to reference a Dog, with as a result that code internally could be optimized,

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

2000-09-01 Thread Michael Fowler
On Fri, Sep 01, 2000 at 10:58:36AM -0800, Michael Fowler wrote: my $spot isa(Dog); This should be my $spot : isa(Dog); Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com --

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

2000-09-01 Thread Michael Fowler
On Fri, Sep 01, 2000 at 12:35:24PM -0700, David E. Wheeler wrote: Well then, that makes this example rather wasteful, doesn't it? It wasn't an example of how my Dog $spot should be used. I was explaining to Nate what his code was doing. my Dog $spot; if ($input eq 'Collie') {

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

2000-08-30 Thread Michael Fowler
On Tue, Aug 29, 2000 at 12:57:07PM -0700, Matt Youell wrote: So perhaps sometimes in Perl we could say: my Dog $spot = undef;# Automagically knows to be a Dog ref instead of a Dog object because of the undef. if ($age 12) { $spot = new Doberman(); } else {

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

2000-08-29 Thread Michael Fowler
On Tue, Aug 29, 2000 at 11:04:26PM -0400, Michael Maraist wrote: First greatly stylistic compatibilty. An inexperienced programmer would see: my Dog $spot = "Spot"; And become confused. It's totally unintuitive (at least so far as other mainstream OO languages go). It looks like Dog