From: Tom Christiansen [mailto:[EMAIL PROTECTED]]
From: Jarkko Hietaniemi
I find this urge to push exceptions everywhere quite sad.
Rather.
Languages that have forgotten or dismissed error returns, turning
instead to exceptions for everything in an effort to make the code
"safer",
From: Tom Christiansen [mailto:[EMAIL PROTECTED]]
From: Jarkko Hietaniemi
I find this urge to push exceptions everywhere quite sad.
Rather.
Languages that have forgotten or dismissed error returns, turning
instead to exceptions for everything in an effort to make the code
"safer",
From: Tom Christiansen [mailto:[EMAIL PROTECTED]]
From: Garrett Goebel
There seems to be some general consensus that some people
would like to be able to short-circuit functions like
grep. Do you see no need for the code
block equivalent of Cnext/Clast/Credo?
What, you mean like
I find this urge to push exceptions everywhere quite sad.
Rather.
Languages that have forgotten or dismissed error returns, turning
instead to exceptions for everything in an effort to make the code
"safer", tend in fact to produce code that is tedious and annoying.
Read the new KP: "failing
David L. Nicol wrote:
This ability to jump to "the right place" is exactly what exception handling
is for, as I understand it. Exceptions allow us to have one kind of block
and any number of kinds of exit mechanisms. If qC(last die return) are all
excpetions, the can travel up the call
'John Porter' wrote:
David L. Nicol wrote:
"Randal L. Schwartz" wrote:
I think we need a distinction between "looping" blocks and
"non-looping" blocks. And further, it still makes sense to
distinguish "blocks that return values" (like subroutines and map/grep
blocks) from
David L. Nicol wrote:
"Randal L. Schwartz" wrote:
I think we need a distinction between "looping" blocks and
"non-looping" blocks. And further, it still makes sense to
distinguish "blocks that return values" (like subroutines and map/grep
blocks) from either of those. But I'll need
David L. Nicol wrote:
"Randal L. Schwartz" wrote:
I think we need a distinction between "looping" blocks and
"non-looping" blocks. And further, it still makes sense to
distinguish "blocks that return values" (like subroutines and map/grep
blocks) from either of those. But
Jarkko Hietaniemi wrote:
In the other camp, Cyield has been suggested; but
the conflation of that with its thread-related semantics may not
be a such good idea.
Cpass.
Well, "pass" might be o.k.; but it usually means something going
*into* a sub, not coming out...
--
John Porter
On Thu, Sep 14, 2000 at 11:46:31AM -0400, 'John Porter' wrote:
Jarkko Hietaniemi wrote:
In the other camp, Cyield has been suggested; but
the conflation of that with its thread-related semantics may not
be a such good idea.
Cpass.
Well, "pass" might be o.k.; but it usually means
David L. Nicol wrote:
This ability to jump to "the right place" is exactly what exception handling
is for, as I understand it. Exceptions allow us to have one kind of block
and any number of kinds of exit mechanisms. If qC(last die return) are all
excpetions, the can travel up the call
'John Porter' wrote:
David L. Nicol wrote:
"Randal L. Schwartz" wrote:
I think we need a distinction between "looping" blocks and
"non-looping" blocks. And further, it still makes sense to
distinguish "blocks that return values" (like subroutines and map/grep
blocks) from
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Garrett Goebel [EMAIL PROTECTED] writes:
I agree... why can't a block be a block? Or put another
way, instead of trying to shoehorn in something new, why
don't we take away something old and treat all the blocks
the same under Perl
"Randal L. Schwartz" wrote:
I think we need a distinction between "looping" blocks and
"non-looping" blocks. And further, it still makes sense to
distinguish "blocks that return values" (like subroutines and map/grep
blocks) from either of those. But I'll need further time to process
On Mon, Sep 11, 2000 at 04:41:29PM -0500, Jarkko Hietaniemi wrote:
Allow me to repeat: instead of trying to shoehorn (or piledrive) new
semantics onto existing keywords/syntax, let's create something new.
The blocks of grep/map/... are special. They are not quite looping
blocks, they are not
Jarkko Hietaniemi wrote:
Allow me to repeat: instead of trying to shoehorn (or piledrive) new
semantics onto existing keywords/syntax, let's create something new.
The blocks of grep/map/... are special. They are not quite looping
blocks, they are not quite sub blocks, they are different.
Steve Fink wrote:
So, why not get rid of the specialness? Why can't all blocks return
their last value?
Then we would have sub BLOCKs and loop BLOCKs. 'return' would escape the
nearest enclosing sub BLOCK and return a value. last/redo/next would
escape/repeat/continue the enclosing
From: Steve Fink [mailto:[EMAIL PROTECTED]]
Jarkko Hietaniemi wrote:
Allow me to repeat: instead of trying to shoehorn (or piledrive) new
semantics onto existing keywords/syntax, let's create something new.
The blocks of grep/map/... are special. They are not quite looping
blocks,
"Garrett" == Garrett Goebel [EMAIL PROTECTED] writes:
Garrett I agree... why can't a block be a block? Or put another way, instead of
Garrett trying to shoehorn in something new, why don't we take away something old
Garrett and treat all the blocks the same under Perl 6?
You mean this would no
From: John Porter [mailto:[EMAIL PROTECTED]]
Randal L. Schwartz wrote:
Yes, I'd be in favor of making return() in a valued block
(as opposed to a looping block) abort the block early and
return the value.
Imho, it should return the value, but not abort the block.
I.e. stick
From: Nathan Wiger [mailto:[EMAIL PROTECTED]]
Ariel Scolnicov wrote:
Chaim Frenkel [EMAIL PROTECTED] writes:
yield EXPR - stop what I am doing now and give something else a
a chance to do its things. And while you are doing
that please take this
Garrett Goebel wrote:
I'd be surprised if
sub mygrep (@) {
my ($coderef, @list, @stack) = @_;
$coderef and push(@stack, $_) foreach (@list);
return @stack;
}
@a = mygrep { return ($_ = 2) ? 1 : 0 } (1, 2, 3, 2, 1);
print "\@a = @a\n";
Resulted in: @a =
Instead of the
On Mon, Sep 11, 2000 at 05:31:33PM -0400, 'John Porter' wrote:
Garrett Goebel wrote:
I'd be surprised if
sub mygrep (@) {
my ($coderef, @list, @stack) = @_;
$coderef and push(@stack, $_) foreach (@list);
return @stack;
}
@a = mygrep { return ($_ = 2) ? 1 : 0 } (1,
23 matches
Mail list logo