On Mon, 2002-10-28 at 14:41, Larry Wall wrote:
And maybe:
A bitwise operator is just a logic operator scoped to a set of bits.
Hypo-operators. :-)
--
Bryan C. Warnock
bwarnock(gtemail.net|raba.com)
On 27 Oct 2002, Marco Baringer wrote:
: why not use - to create a sub which you can return from?
:
: if $foo - {
: ...
: return if $bar;
: ...
: }
Except that by the current rule you can only Creturn from something
that is declared with the word sub. -{...} is still just a fancy
block
How about leave?
leave
SURROUNDING | [SURROUNDING]IDENTIFIER
[ [result] VALUE-SPEC ];
Aliases:
=
return - leave sub
exit - leave program (or is it thread?)
break - leave loop (this is shaky: does it deserve to be here?)
last - leave block
Extensions (these are WAY!
From: Larry Wall [EMAIL PROTECTED]
last almost works, except it's specific to loops
But last also works for anonymous blocks, which aren't loops. (Aren't they?
Don't know about you tovarisch, but my anonymous blocks execute just once.)
In fact, that's why I asked. I have a lot of code that
Larry Wall:
# last almost works, except it's specific
# to loops, at least in Perl 5 semantics. I keep thinking of
# ret as a little return, but that's mostly a placeholder
# in my mind. I've got a lot of those...
I don't see why Clast has to work only on loops, or why there can't be
an
On Mon, 28 Oct 2002, Austin Hastings wrote:
: How about leave?
Right, that brings back some memories.
: leave
: SURROUNDING | [SURROUNDING]IDENTIFIER
: [ [result] VALUE-SPEC ];
:
: Aliases:
: =
: return - leave sub
Right.
: exit - leave program (or is it thread?)
Hmm.
Sorry, forgot to hit reply-all.
--- Austin Hastings [EMAIL PROTECTED] wrote:
Date: Mon, 28 Oct 2002 12:58:16 -0800 (PST)
From: Austin Hastings [EMAIL PROTECTED]
Subject: Re: labeled if blocks
To: Larry Wall [EMAIL PROTECTED]
--- Larry Wall [EMAIL PROTECTED] wrote:
On Mon, 28 Oct 2002
And maybe:
A bitwise operator is just a logic operator scoped to a set of
bits.
That's why I can't accept a characterization of
++|+X - bitwise operations on int
+= +|= +X=
~~|~X - bitwise operations on str
~= ~|=
On Tue, 29 Oct 2002, Angel Faus wrote:
: Could we please, please, please have bitwise operators be out of the
: core. We expect that they are not going to be used by the average
: user, so it looks fair to apply the ultimate negative huffman
: enconding: they need to be specially required.
:
:
And that's also why we need a different way of returning from the
innermost block (or any labelled block). last almost works, except
it's specific to loops, at least in Perl 5 semantics. I keep thinking
of ret as a little return, but that's mostly a placeholder in
my mind. I've got a lot
Larry Wall [EMAIL PROTECTED] writes:
On 27 Oct 2002, Marco Baringer wrote:
: why not use - to create a sub which you can return from?
:
: if $foo - {
: ...
: return if $bar;
: ...
: }
Except that by the current rule you can only Creturn from something
that is declared with the
On Mon, 28 Oct 2002 at 14:50 -0800, Larry Wall [EMAIL PROTECTED] wrote:
On Tue, 29 Oct 2002, Angel Faus wrote:
: Could we please, please, please have bitwise operators be out of the
: core. We expect that they are not going to be used by the average
: user, so it looks fair to apply the
On 29 Oct 2002, Marco Baringer wrote:
: Larry Wall [EMAIL PROTECTED] writes:
:
: On 27 Oct 2002, Marco Baringer wrote:
: : why not use - to create a sub which you can return from?
: :
: : if $foo - {
: : ...
: : return if $bar;
: : ...
: : }
:
: Except that by the current rule
On Mon, 28 Oct 2002, David Dyck wrote:
: I admit that I use pack, bitwise operators, as well as 0x constants
: in many of my scripts. I'm not sure what Angel means by taking
: some of these things out of the core, but if my short perl5 scripts
: start to grow to python length I'll have less
Larry Wall:
# I have historically preferred that approach. Certainly it's
# something that could be enforced by a policy file too. An
# intro to programming class is likely to have such a policy
# file anyway:
#
# $ perl6
# use CS_101;
# if $a | $b {
# Prof. Roberts says you
Larry Wall [EMAIL PROTECTED] writes:
We could make return a method as well as a built-in sub. That gives us
Loop.return($x)
Sub.return($x)
Topic.return($x)
Thread.return($x)
Block.return($x)
There.return($x)
or
return Loop: $x
return Sub: $x
--
On Sat, 26 Oct 2002 21:02:20
Larry Wall wrote:
On Sat, 26 Oct 2002, Steve Canfield wrote:
: Will Perl6 have labeled if blocks? Like this:
:
: BLAH:
: if ($foo) {
: ...
: last BLAH if $bar;
: ...
: }
I don't see why we need it offhand. But we might well have
Steve Canfield [EMAIL PROTECTED] writes:
Will Perl6 have labeled if blocks? Like this:
BLAH:
if ($foo) {
...
last BLAH if $bar;
...
}
why not use - to create a sub which you can return from?
if $foo - {
...
return if $bar;
...
}
this of course means you
Will Perl6 have labeled if blocks? Like this:
BLAH:
if ($foo) {
...
last BLAH if $bar;
...
}
_
Surf the Web without missing calls! Get MSN Broadband.
http://resourcecenter.msn.com/access/plans/freeactivation.asp
On Sat, 26 Oct 2002, Steve Canfield wrote:
: Will Perl6 have labeled if blocks? Like this:
:
: BLAH:
: if ($foo) {
: ...
: last BLAH if $bar;
: ...
: }
I don't see why we need it offhand. But we might well have something
that returns out of the innermost {...} anyway, so
20 matches
Mail list logo