Juerd wrote:
$y() = 7;
No, sorry, that looks to me as if $y is a reference to an lvalue sub,
not like any form of referencing of scalars.
I think it will come naturally to the C++ and Java folks. There the
accessor kind of functions is either mapped into the name get_y()
and set_y(value), or
Okay, I've made up my mind. The err option is not tenable because
it can cloak real exceptions, and having multiple versions of reduce is
simply multiplying entities without adding much power. So let's allow
an optional identvalue trait on operators. If it's there, reduce
can use it. If it's
Hi,
sub foo (Code $code) {
my $return_to_caller = - $ret { return $ret };
$code($return_to_caller);
return 23;
}
sub bar (Code $return) { $return(42) }
say foo bar; # 42 or 23?
I think it should output 42, as the return() in the pointy
block $return_to_caller
Ingo~
On 6/7/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote:
Hi,
sub foo (Code $code) {
my $return_to_caller = - $ret { return $ret };
$code($return_to_caller);
return 23;
}
sub bar (Code $return) { $return(42) }
say foo bar; # 42 or 23?
I think it should
Ingo Blechschmidt [EMAIL PROTECTED] writes:
Hi,
sub foo (Code $code) {
my $return_to_caller = - $ret { return $ret };
$code($return_to_caller);
return 23;
}
sub bar (Code $return) { $return(42) }
say foo bar; # 42 or 23?
I think it should output
Hi,
Matt Fowles wrote:
On 6/7/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote:
sub foo (Code $code) {
my $return_to_caller = - $ret { return $ret };
$code($return_to_caller);
return 23;
}
sub bar (Code $return) { $return(42) }
say foo bar; # 42 or 23?
I think it
On 6/7/05, Matt Fowles [EMAIL PROTECTED] wrote:
On 6/7/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote:
Hi,
sub foo (Code $code) {
my $return_to_caller = - $ret { return $ret };
$code($return_to_caller);
return 23;
}
sub bar (Code $return) { $return(42) }
On 6/7/05, Luke Palmer [EMAIL PROTECTED] wrote:
Then let's put it this way:
sub foo () {
for 0..10 {
when 6 { return 42 }
}
return 26;
}
And if that didn't do it, then let's write it equivalently as:
sub foo () {
map(- $_ { return 42
All~
On 6/7/05, Luke Palmer [EMAIL PROTECTED] wrote:
On 6/7/05, Matt Fowles [EMAIL PROTECTED] wrote:
On 6/7/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote:
Hi,
sub foo (Code $code) {
my $return_to_caller = - $ret { return $ret };
$code($return_to_caller);
On 6/7/05, Larry Wall [EMAIL PROTECTED] wrote:
Okay, I've made up my mind. The err option is not tenable because
it can cloak real exceptions, and having multiple versions of reduce is
simply multiplying entities without adding much power. So let's allow
an optional identvalue trait on
On Tue, Jun 07, 2005 at 09:41:49PM +, Luke Palmer wrote:
: and still don't make sense as reduce operators.
Yeah, I keep confusing them with min and max.
: That reminds me, how are , , etc. defined anyway? How can we tell
: them to be list-associative with each other?
Because they're all
On 6/7/05, Larry Wall [EMAIL PROTECTED] wrote:
On Tue, Jun 07, 2005 at 09:41:49PM +, Luke Palmer wrote:
: and still don't make sense as reduce operators.
Yeah, I keep confusing them with min and max.
: That reminds me, how are , , etc. defined anyway? How can we tell
: them to be
Luke Palmer wrote:
and still don't make sense as reduce operators. Observe the table:
# of args | Return (type)
0 | -Inf
1 | Num (the argument)
2 | bool
... | bool
Let's look at the type of one of the many `reduce'
On Tuesday 07 June 2005 23:41, Luke Palmer wrote:
On 6/7/05, Larry Wall [EMAIL PROTECTED] wrote:
Okay, I've made up my mind. The err option is not tenable because
it can cloak real exceptions, and having multiple versions of reduce is
simply multiplying entities without adding much power.
14 matches
Mail list logo