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 %?.
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
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
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
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
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
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
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,
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
--
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') {
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 {
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
12 matches
Mail list logo