Dan Sugalski wrote:
>
>@a = @b | @c;
>
> nothing short-circuits but then you don't expect it to, and that's more or
> less OK. The and operation would likely return the left-hand value if both
> are true, and xor would return whichever of the two were true, or undef of
> both (or neither)
> "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
Mark-Jason Dominus wrote:
>
> Maybe I should also mention that last week I had a dream in which I
> had a brilliant idea for adding strong compile-time type checking to
> Perl, but when I woke up I realized it wasn't going to work.
What do you see as the major obstructions?
eval "" isn't too ba
> Have you considered adding a C example to RFC 31? Yield would add
> multiple output items per input item better IMO than the current practice
> of accumulating a list of output items and returning it at the end.
>
>%newhash = map {yield $_; transform $somehash{$_}} @keysubse
> You talked about Good Typing at YAPC, but I missed it. There's a
> discussion of typing on perl6-language. Do you have notes or a
> redux of your talk available to inform this debate?
http://www.plover.com/~mjd/perl/yak/typing/TABLE_OF_CONTENTS.html
http://www.plover.com/~mjd/perl/yak/typing
Jeremy Howard wrote:
> >
> Of course they have reasonable meanings for arrays--element-wise operations
> (RFC 82):
>
> http://tmtowtdi.perl.org/rfc/82.html
>
> Any operation you can do on a scalar you should be able to do element-wise
> on a list, and certainly it's not hard to come up with si
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
>
> [EMAIL PROTECTED] wrote:
> >
> > Could we please take discussion of 179 to -data? I think that's where
> > it should be.
> >
> > K.
>
> Personnally, I don't see any objection to this.
> If everybody is ok, why not ?
>
> How should I process ? Submit again the proposal with a modified
> mailing-
Dan Sugalski wrote:
> ...would anyone object to the _binary_ operators being used
> instead? They don't have short-circuit semantics, and generally don't have
> any reasonable meanings for hashes and arrays. With that, instead of
> writing the above code, you'd write:
>
>@a = @b | @c;
>
> noth
I hate to bring this back up, but I'm designing bits of the internal api at
the moment, so this is an issue.
I'd like to have some sort of support for doing things like:
@a = @b || @c;
where @a is as big as the biggest of @b and @c, and for any individual
entry, will be the value from @b i
Damian Conway wrote:
> :-)
>
> I did consider that too, but the problem is that according to RFC 31 a
> C leaves the future entry point of a block at the next statement
> after the C, whereas the block needs to start from the beginning on
> each iteration.
>
> Damian
Have you considered addin
"Randal L. Schwartz" wrote:
> how do you indicate with 'last' that you
> want a false return, or a true return? This never comes up with a do
> {} block, or a subroutine block, because while those are being
> evaluated for a value, they don't respect last/next/redo.
if "last" means, return the
On Tue, 12 Sep 2000 18:46:04 GMT, Ed Mills wrote:
>So what about
>
> (do something) foreach (some list);
>
>i.e.
>
> print foreach (@l);
You really should try out one of the more recent Perls.
http://www.perl.com/CPAN-local/doc/manual/html/pod/perldelta.html#C_EXPR_foreach_EXPR_is_supporte
Ed Mills wrote:
>
> So what about
>
>(do something) foreach (some list);
>
> Just a thought..
No, it's not just a thought.
% perl56 -e 'print "Item $_\n" for qw( foo bar quux )'
Item foo
Item bar
Item quux
But you're thinking along the right lines!
--
John Porter
I really like
(do something) if (something is TRUE);
as opposed to
if (something is TRUE) {do something}
Just personal taste I guess, but to me the former is a nice Perlism.
So what about
(do something) foreach (some list);
i.e.
print foreach (@l);
as opposed to
foreach (@l)
I wrote:
>
> I can count how many times I've wanted to -- and thought
s/can/can't/. :-o
--
John Porter
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 enclosin
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 differen
At 09:37 AM 9/12/00 -0400, Jerrad Pierce wrote:
>Doh! perhaps then more like:
>
> #grep for str's beginning and ending in a digit
> grep ITEM: { /^[1-9]/; next ITEM unless /[1-9]$/ } @list;
>
>Of course there are other ways of writing this...
>Are there any cases people want this f
> "TC" == Tom Christiansen <[EMAIL PROTECTED]> writes:
>> Basically a hash with
>> only the keys, no other baggage.
TC> If you don't want but the keys, don't use but the keys.
Does that mean, that none of the other bookeeping for the values will
be done?
Is this "@hash{@keys};" valid?
Wou
>> grep ITEM: { /^[1-9]/ || next ITEM } @list;
>Not much that I can see, but your next does not include any return value,
>so what should it be? Of course, if it's false, you didn't need a next in
>the first place and if it's true you didn't need a grep in the first place :-)
Doh! perha
[EMAIL PROTECTED] wrote:
>
> Could we please take discussion of 179 to -data? I think that's where
> it should be.
>
> K.
Personnally, I don't see any objection to this.
If everybody is ok, why not ?
How should I process ? Submit again the proposal with a modified
mailing-list email ?
Gael,
Tom Christiansen wrote:
>
> >I don't want a set representation. I want set operations. And somehow
> >for this having to add a use statment and who knows what overhead for
> >what seems to be a simple operation is a pain.
>
> The overhead is not that it should be a module, but rather,
> the sill
Tom Christiansen <[EMAIL PROTECTED]> writes:
> >I don't want a set representation. I want set operations. And somehow
> >for this having to add a use statment and who knows what overhead for
> >what seems to be a simple operation is a pain.
>
> The overhead is not that it should be a module, but
hi,
REBOL is the next generation of distributed communications. By "distributed"
we mean that REBOL code and data can span more than 40 platforms without
modification using ten built-in Internet protocols. The pieces of a program
can be distributed over many systems. By "communications" we mean t
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
26 matches
Mail list logo