With a regex you can get much finer control; with a "r" modifier
for the regexen indicating that it should start at the end of
the string instead of the beginning the speed issue is gone;
i think unchop and unchomp is silly; that's what .= is for
--
David Nicol 816.
Nathan Torkington wrote:
>
> Dan Sugalski writes:
> > Which sort of argues for localtime in a numeric scalar context to return
> > epoch seconds, in a string scalar context to return a time string, and in a
> > plain scalar context a hashref. (or mini-object, or tied thingamabob, or
> > whatever)
Clayton Scott wrote:
> I first thought that "==" and "eq" were cut from the same cloth as
> "||" and "or" that is the difference was precedence. Then I learned.
Mr. Scott's experience is evidence for a strong argument AGAINST operator
overloading. If we allow object types, and allow o
Dan Sugalski wrote:
> Both the l and rvalues will need to participate.
Sorry. Quick review of how C++ does it indicates that
selecting an assignment operator from the lvalue's methods
makes sense.
Since we have dynamic typing, there's nothing keeping an
assignment method from running through
Dan Sugalski wrote:
> While it may not be correct, at least it's exact. If we go with an inexact
> representation, we run the risk of accumulating errors and eventually
> ending up with a number that's both inexact and incorrect.
>
> Dan Sugalski the even samurai
Why n
"Bryan C. Warnock" wrote:
> This was the ass that I never found the gall to scratch, because I've
> identified no solutions, and have found only problems.
>
> --
> Bryan C. Warnock
> ([EMAIL PROTECTED])
Let me see if I can paraphrase you accurately:
Defining a framework for modifying compil
Damian Conway wrote:
>
>> What is:
>>
>> $x = date();
>>
>> going to return?
>
> Probably the current scalar context result (i.e. a date string)
>
>> An object that has many different -ify methods:
>> stringify
>> numify
>> hashify
>> listify
>
perl parser compiles perl language into perl op-code tree.
Larry ("the" Larry) has said that a new parser might parse
other languages into perl op-code trees too.
If the parts of the language are well organized, a LanguageSwitch
(the computer equivalent of a "context switch" in a conversation
I've started talking about "containers" instead of arrays and hashes
since those both tie directly to implementation details, and containers
are abstractions.
A self-sorting container would be easy enough to tie to, most methods
would inherit from an underlying numbered array, except the ins
Peter Scott wrote:
> >Perl 5.6.0 has [[:lower:]] and [[:upper:]].
>
> Yes, but this one is worth a digraph. Question is, which one? Currently
> the free ones are:
>
> \F \h \H \i \I \j \J \k \K \m \M \o \O \q \R \T \v \V \y \Y
>
> \v \V are being debated on p5p currently.
>
> I s
Damian Conway wrote:
>
>> methodoverloadoperator(%thehashinquestion, 'sort', {$a flubber $b})
>>
>> What is a better syntax for this?
>
> tie %thehashinquestion, 'Sorted', flubber(^a,^b);
>
> ???
>
> Damian
Compiler will know to pass flubber as ref-to-code instead of
intant eval
It's a vast and contrived joke, right?
I like the way the "check out the (xx) page" links
tend to link to exactly the page you are looking at
Jarkko Hietaniemi wrote:
>
> We will never conquer the world with Perl 6:
> CobolScript(R) got there before us.
>
> http://www.cobolscript.com/
Michael Fowler wrote:
> > > Which then raises a few more problems (whew): how do you coax user input
> > > (which is an SV) into a value $foo can accept with very-strict on?
> >
> > You run it through an explicit conversion process, like using C in
> > a C program
>
> Unfortunately, this involv
Whose RFC deals with this?
Why not call them throw and catch, like everywhere else,
and reccomend them over die? In fact Die could be defined
in terms of throw
sub die(@){ throw(generic_fatal,$!,@_) }
*
Further discussion in the thread discussed the idea of returning
to the point
Dave Storrs wrote:
>
> On Fri, 11 Aug 2000, David L. Nicol wrote:
>
> > I've started talking about "containers" instead of arrays and hashes
> > since those both tie directly to implementation details, and containers
> > are abstractions.
> [...]
&g
Dan Sugalski wrote:
>
> perl cribs from english as much as
> any other language, spending some time to get names that fit well makes
> perfect sense, especially since most of the perl programmers that start
> using this won't be coming with huge gobs of experience from languages that
> already do
azy list to be passed to our filter function C, saving
us from allocating the entire C array. C is still in
the default busy context, so it returns a busy array, which C
can iterate over safely.
Tom Hughes wrote:
>
> In article <[EMAIL PROTECTED]>, "David L. Nicol"
These things sound like perfectly reasonable CPAN modules.
What's the block prevenenting their implementation w/in the
perl5 framework?
Ariel Scolnicov wrote:
>
> Damian Conway <[EMAIL PROTECTED]> writes:
>
> > Just to point out that the standard CS term is "merge".
>
> `merge' produces a
This sort of thing is an excellent example of how method
selection based on calling context can help.
When somebody wants to overload existing keywords for their
slick new type, with overloading based on context they don't
have to touch the internals of the current methods at all.
rapt
Jonathan Scott Duff wrote:
>
> On Mon, Aug 14, 2000 at 09:40:07PM -0500, David L. Nicol wrote:
> > Jonathan Scott Duff wrote:
> > >
> > > > context-based method overloading
> > >
> > > I think you should s/method/subroutine/ everywhere in this
If "catch" can be defined DURING PARSING
and SYNTAX ERRORS are catchable
error handling can be used to define otherwise
undefined syntax, becoming a macro language.
This would be similar to the RFC18 immediate subroutines,
as it would be another way to change the language of the
remainder o
Say we allow instantly tied lazy subroutine definitions
like so:
@naturals = (? { my $x=1; yield $x++ while 1 })
Is the code block in there a subroutine or a method?
And why?
How about using the eminently deprecatable "reset" operator
to start a tied lazy array back at it's "original"
The poll can't have been exhaustive.
I like these magic variables that depend on currently selected
fie handles, they remind me of Pascal's C construction
for entering the name space of a record structure.
Anyone for generalizing "select" to a more general "with" keyword
which would operate
Bart Lateur wrote:
>
> To me, a program is much like a maze, a
> multilevel walk in an old castle.
And if you commit a faux pas of some kind, the guards show
up and "throw" you off the north tower.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
The penguin module, as written about in an early TPJ
http://cpan.valueclick.com/authors/id/F/FS/FSG/
is a way to mask off part of the functionality of your perl
in order to "sandbox" with very fine grained control.
Let's put that into the core of perl6, the ability to
turn features off, part
Glenn Linderman wrote:
>
> This deserves a "me too".
>
> Perl6 RFC Librarian wrote:
>
> > The camel and the docs include this example:
>
> >if (/Time: (..):(..):(..)/) {
> > $hours = $1;
> > $minutes = $2;
> > $seconds = $3;
> > }
> >
> > This then becomes:
> >
s/PSEUDO\S?HASH/STRUCT/g
> This RFC proposes that the existing C<..> operator produce a lazily
> evaluated list. In addition, a new operation C<:> is proposed that allows
> for the generation of lazily evaluated lists based on any Perl expression.
Llama 2nd ed. calls ? the "lazy operator" w/in regexes, in my lazy props
Damian Conway wrote:
>
>>%professors{ $a->name cmp $b->name };
>>
>>%students{ $$students{$b}{GPA} <=> $$students{$a}{GPA} };
>
> These already mean something. Please don't "special-case" them.
No they don't.
[david@nicol1 perl]$ perl -le '%nums = (1..20); print %nums{1}'
C
What if its a method of anything in an array? $_ is already
a reference to the object on the array in for loops rather
than a copy of it. What if we make change be not something about
for loops, but about anything in an array?
print "The index, in its array, of <<$_>> is $CORE::ARRAY
_new = 3; # just set $record{something_new} to 3
};
Dave Storrs wrote:
>
> On Wed, 16 Aug 2000, David L. Nicol wrote:
>
> > a more general "with" keyword
> > which would operate on a hash and be syntactic sugar for
> > replacing all appearances of
Jonathan Scott Duff wrote:
>
> On Tue, Aug 15, 2000 at 05:47:53PM -0600, Nathan Torkington wrote:
> > I want
> > @result = @a || @b;
> > to be like:
> > (@result = @a) or (@result = @b);
> >
> > That's what all my students keep expecting it to mean.
>
> And that's what I keep wishing it mea
Jeremy Howard wrote:
>
> This is one of those
> few cases where VB has nicer syntax--within a 'with' block you have to
> precede a property name with '.' to get the with block scope:
>
> dim height as double
> dim ws as new Excel.worksheet // 'worksheet' has a 'height' property
>
> with
Damian Conway wrote:
> Actually, no I wouldn't.
> I'd be happier if it were more explicit.
>
> How about:
>
> keys %professors = ^a->name cmp ^b->name;
>
> keys %students = $$students{^1}{GPA} <=> $$students{^0}{GPA} };
>
> ;-)
>
> Damian
Okay, let's see what you've got here
Jonathan Scott Duff wrote:
> But no $ for the keys of %ws.
>
> %ws {
> print ^height; # prints $ws{height}
> print $height; # prints $height
> }
I'm thinking that ^name is short for $^name is short for ${^name}
and the longer version is what you
Glenn Linderman wrote:
>
> Peter Scott wrote:
>
> > I have often wished that digraphs were not bundled with variables in this
> > respect, i.e., I wanted to put a string containing \n inside single quotes
> > just 'cuz it didn't contain variables to be interpolated. Whether there's
> > a way of
Perl6 RFC Librarian wrote:
> =head1 TITLE
>
> Default methods for objects
>
> =head1 ABSTRACT
>
> This RFC proposes syntactic support for default methods
> that can be defined for blessed references. This would
> allow the brackets C<()>, C<{}> and C<[]> to be used
> for a variety of convenien
Mike Pastore wrote:
>
> Any thoughts on this?
Attributes.
($item : arrayposition) would tell us what the position is.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Does despair.com sell a discordian calendar?
Jonathan Scott Duff wrote:
>
> Does the presence of an ordering subroutine cause perl to generate a
> linked list of all the elements of the %hash in the proper sequence
> prior to iteration (and somehow attach it to the iterator)? Seems
> like everytime we did that it would generate a new oper
Jarkko Hietaniemi wrote:
> > $item:n would be the position $item had in the last container it was in
>
> $item:i, you surely meant? $item:n would be the size of the list...
The size of the list would be something like $#{$item:contained_in}
the size of the list is not a property of the item, s
Peter Scott wrote:
>
> At 05:12 AM 8/19/00 +1000, Damian Conway wrote:
> >> The main downside of accessors is that you can't (currently) say
> >>
> >> local $obj->attribute = 2;
> >
> >Even if C returns an lvalue???
>
> If it does, how do you localize it? What would that mean?
Here's my RFC todo list which I am dropping like a good mensch
on the occasion of Friday Evening.
RFC: Perl6 is Final. There will Be No Perl7
We declare that our framework willbe so flexiblke
that anything can be done with it and there will be no penalty
for something being in-
"Bryan C. Warnock" wrote:
>
> On Fri, 18 Aug 2000, David L. Nicol wrote:
> > There will Be No Perl7
>
> Of course not. Odd numbers are the development releases. The next
> Perl after 6 will be 8.
So maybe the reference implementation should be written in per
Larry Wall wrote:
>
> Ed Mills writes:
> : But don't {} or {1} sort of do the same thing?
>
> Well, { warn "Encountered stub"; (); } would be more like it. But the
> biggest problem with {} or {1} is that they don't resemble an ellipsis.
>
> Larry
dot operator selection:
The token clarifie
title: study a list of regexes
David Nicol.
Aug 21
version 1
[EMAIL PROTECTED]
Sometimes I have a group of regexen, and I would like to know
which ones will match.
Current practice is to "study" $situation and then grep them:
example a:
study $situation;
@matches = @rules{
Ken Fox wrote:
> IMHO, curries have nothing to do with this. All "with" really does is
> create a dynamic scope from the contents of the hash and evaluate its
> block in that scope.
Right, the "with" people are using ^hats because its an available
operator, just the same way the "curry" people
Some have been frustrated at the fact that after
@ott = (1,2,3);
$x = @ott
$x == 3.
What if one of the things that lazy arrays did differently from
normal arrays was shifting on assignment, instead of counting
themselves?
This would solve several problems at once, including:
This sounds like another job for the macro language.
Anyone have any idea what the macro language should look
like, aside from that the variables in it which will get
replaced might wear hats?
defining -language-macro might be premature because identifying
what suggestions and shortcuts make
>
> Consider the following syntax:
>
> my var; # declaring a scalar
> my array[]; # declaring an array
> my hash{};# declaring a hash
For the remainder of the enclosing block, the barewords var,
array and hash are to be interpreted as references to a scalar, an
array, and a ha
David Corbin wrote:
> >
> > For the remainder of the enclosing block, the barewords var,
> > array and hash are to be interpreted as references to a scalar, an
> > array, and a hash.
>
> I'm confused by this statement. Are you suggesting an alternative to
> the original RFC?
No, I was trying
Buddha Buck wrote:
> Perhaps someone should RFC the new special variable &ME, which is
> predefined to be the whole program. Who knows? Perhaps it would then make
> sense to use @_ at the top level, as if the program was invoked as
> "&ME(@ARGV);"...
on -objects it has been proposed that &ME i
Perl6 RFC Librarian wrote:
> =head1 IMPLEMENTATION
>
> Probably has to be added to perl internals...
>
> I wonder what will happen with overloads though - is eq/i a new operator
> to overload or is the case-insensitivity somehow magically done by the
> Perl interpreter even though eq was overl
Jarkko Hietaniemi wrote:
> " e q "
that breaks our long and glorious tradition of splitting tokens
on whitespace. How about e_q for this one?
> That is, an operator that ignores any leading, any trailing, and treats
> all intraspace as equivalent. If the embedded space is confusing,
Last week when I wrote "everything is an exception" this is what
I was talking about.
Nathan Torkington wrote:
> This raises another issue, though:
>
> You'd obviously want to have a module that collected together your
> favourite new operators. But if they were lexically scoped, they'd
>
Michael G Schwern wrote:
> Compare:
>
> dbmopen(%foo, 'somefile', 0644);
>
> with:
>
%foo:persistent(file=>somefile);
My largely ignored RFC about "shell style redirection" suggested
pretty much this. perl5 has it as a feature hidden on the fourth page
of the perldoc for "open"
It also lets < neatly double as a compact print operator
Chaim Frenkel wrote:
>
> With threading coming, would having a >() and
David Corbin wrote:
> In addition to the four I posted, originally, I've added two. Here's my
> working list.
>
> native pattern matching;
> list manipulation
> aweswome text processing.
> It's application glue (thanks Tim)
> Ability to write powerful 1-line programs.
> Make easy things easy a
Steve Simmons wrote:
> IMHO the code
>
> $a = '3.14'; # from reading a file
> $b = '3.1400'; # from user input
> if ($a == $b) { ... }
>
> should see the two args being tested in numeric context, do the numeric
> casting, get floats, and do a floating compare. Durned if I know what
Exactly. We need a nondestructive slice. Some short piece of
syntax which expands
for [my](list of vars) (big list){ ... }
to
my @uniquelynamedcopy = (big list);
while ( [my](list of vars) = splice(@u15y,0,(length of list of vars))){ ... }
I think the absence o
Andy Dougherty wrote:
>
> On Tue, 29 Aug 2000, David L. Nicol wrote:
>
> > I'd like to see every number bundled with a "precision" attribute.
>
> While that might be useful for simple calculations, I expect it would
> simply get in the way and sl
the semicolon after the hereis terminator thing might
only work if the beginning of the hereis was the last thing
on the line it appears on, that way there's no ambiguity
$Goodone = <
> I like it... I think I will add this to the next version.
>
> Richard
>
> --
>
> [EMAIL PROTECTE
John Porter wrote:
>
> we should also support recursive data structures,
> as in some functional languages. E.g. (pseudocode):
>
> define foo as {
> short a;
> foo b; # exists at first only "in potential".
> long c;
> };
>
h
Richard Proctor wrote:
>
> This leads back to my original "remove all whitespace". Somehow there is a
> compromise to extracted from this.
Have we explored using a subset of regex for end-markers?
$long_string_possibly_indented_later = <<\w*##ENDEND##\w*;
.
One function that takes an optional leading commaless arg:
sub print(handle? $FH, @)
or
Two functions differentiated by their prototypes
sub print(@);
sub print(handle,@);
I'm always forgetting the comma after the handlename in
C statements because I learned "no c
>
> I am lazy. I am spoiled by the implicit $_. I like the implicit
> $_. Implicit $_ good. Ugh. (Conversely, some people abhor the
I believe you mean "Ug." "Ug" means you are speaking pidgin, while
"Ugh" indicates disgust.
> =head1 IMPLEMENTATION
>
> The front-end would have to detect v
How about ALLOWING bareword everything-else? Start having
filehandles work the way everyone expects them to at first,
passing as arguments and so forth, without any special treatment?
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Subroutine one-arg, him c
Johan Vromans wrote:
>
> Hi David,
>
> [Quoting David L. Nicol, on August 29 2000, 19:27, in "Re: RFC 132 (v3) Sub"]
> > > With the enhanced C operator, subroutines can dynamically decide
> > > what to return.
> >
> > With context-b
Fisher Mark wrote:
> * Units of measure are optional;
> * Units of measure are fast; and
> * Implementing units of measure don't appreciably slow down computations
> that don't use units of measure.
enforced types without automatic conversions does all this, the matches
are made once at compile-
Sam Tregar wrote:
>
> On Thu, 31 Aug 2000, David L. Nicol wrote:
> > run-time efficiency
>
> C doesn't get run-time efficiency from its syntax, so we can't really
> expect to get anything here. It gets it from its compilation
> architecture. If you wan
Nathan Wiger wrote:
>
> "David L. Nicol" wrote:
> >
> > my dog $spot;
> > to
> > dog spot;
> >
> > If we only allow this where enough info is available to allocate dog-sized
> > pieces of memory directly, Perl can blaze t
Sam Tregar wrote:
>
> On Thu, 31 Aug 2000, David L. Nicol wrote:
>
> > We're talking about making a faster Perl. C's syntax requires enough
> > clarity to compile to something quick. it is a very short hop from
> > my dog $spot;
> > to
>
Nathan Wiger wrote:
>
> "David L. Nicol" wrote:
> >
> > They gain us compliance with the whims of the people who like barewords
> > for variable names. You may or may not find that to be a good thing.
>
> It's not just that I don't think drop
Perl6 RFC Librarian wrote:
> arsenal. The constructs are:
>
> $ref->[[LIST]]
> $ref->{{LIST}}
>
> The proposed respective meanings:
>
> $ref->[$elem[0]]->[$elem[1]}->[...]->[$elem[-1]]
> $ref->{$elem[0]}->{$elem[1]}->{...}->{$elem[-1]}
why not just use single
Dan Sugalski wrote:
> I do want to have a set of C/XS/whatever sources as part of the test suite
> as well--right now perl's test suite only tests the language, and I think
> we should also test the HLL interface we present, as it's just as
> important in some ways.
I want to see Perl become a f
David Corbin wrote:
> A C JIT is an interesting idea.
>
> I think that a project works best when it has a set of goals (I haven't
> seen one yet really for Perl 6). Unless this is one of the goals, I can
> easily see how this could become a serious distraction to what I
> perceive as the like
Peter Scott wrote:
>
> >Having the
> >indices in one place saves a lot of characters. Compare
> >
> > $r->{{qw(a b c d e f g h)}}
> >
> >versus
> >
> > $r->{a}->{b}->{c}->{d}->{e}->{f}->{g}->{h}
>
> But I would compare it to
>
> $r->{a}{b}{c}{d}{e}{f}{g}{h}
>
> which is
Peter Scott wrote:
>
> At 11:48 AM 9/3/00 +1100, Damian Conway wrote:
> >> Ever consider then having
> >>
> >> ($a, $b, $c) = ;
> >> or
> >> @a[4,1,5] = ;
> >>
> >> only read three lines?
> >
> >I think this is a superb idea, and look forward to someone's RFC'i
>
> =head1 ABSTRACT
>
> When programming in perl we need really often to calculate
> union, intersection, difference between arrays. It will be
> cool if such functions could be part of the perl6 language.
Arrays/Lists are ordered, sets are not.
For sets, hashes are a better perl representati
) by mercury.Sun.COM
(8.9.3+Sun/8.9.3) with ESMTP id OAA27600; Fri, 1 Sep 2000
14:52
Nathan Wiger wrote:
>
> "David L. Nicol" wrote:
> >
> > No, that would be
> >
> > dog $spot;
>
> No, it wouldn't:
>
> $r = new
John Porter wrote:
>
> David L. Nicol wrote:
> >
> >
> > How about ALLOWING bareword everything-else? Start having
> > filehandles work the way everyone expects them to at first,
> > passing as arguments and so forth, without any special treatment?
Garrett Goebel wrote:
> grep { ref($a) eq ref($b) } @b) # Same type?
> grep { $a == $_ } @b)
> grep { $a eq $_ } @b)
> grep { $a > $_ } @b)
>
> Garrett
grep doesn't short-circuit; you can't return or exit or last out
of the thing.
Maybe we could add support for C to C
Buddha Buck wrote:
> What advantage does this give
None whatsoever. I should have selected a less contentious
example that file handles to demonstrate my opinion that
tagged barewords should be allowed to do anything, not in exclusion
of, but in addition to, the syntactically tagged scalar
Nathan Wiger wrote:
> Intermingling it freely:
>
>my Dog $spot;
>int x;
>my int $y;
>#include
>char * name;
>#do some regexp matching
>s/x/5/;/* match the C value of x defined above */
>
> Is really confusing, even for us humans. :-)
>
> -Nate
Is it confusing?
Nathan Wiger wrote:
>
> "David L. Nicol" wrote:
> >
> > s/x/5/; # this is still going to replace
> > # all the eckses in $_ with fives.
>
> Why? This is an arbitrary decision if you've declared variables to be
> barewords.
"Myers, Dirk" wrote:
> I still find this whole idea confusing, though. Just out of curiosity,
> though, would:
>
> #include a way for users to bail out gracefully
>
> be a syntax error?
It is clear to us that that is a comment and not a preprocessor directive.
The #include preprocesso
"Myers, Dirk" wrote:
> $mode = 0755 ;
> $file = "Foobar" ;
>
> #include
> #include
>
> chmod($mode, $file) ;
>
> Which chmod gets called, perl or C? What are the rules for figuring this
> out?
>
> Dirk
Following the documentation at
http://www.pe
John Porter wrote:
>
> David L. Nicol wrote:
> >
> > A bareword inside doublequotes is not interpreted, in Perl or C.
>
> No; a "bareword" in quotes (any kind) is not a bareword.
>
> --
> John Porter
huh?
--
Johan Vromans wrote:
> my $file_format = qf(
> @<: @
> $name, $ssn
> );
>
> Now, $file_format would be a Format object (compare this with qr//,
> that produces a Regex object).
or the proposed qs// which would produce a packed structure definition
The "assignment from a lazy list" section of RFC 123 suggests a system
for requesting the first however many items out of a map or grep by
making it lazy and then assigning it to an array of that size.
"last" is more flexible, if you are looking for a condition more
complex than the first one,
John Porter wrote:
> heh. for a normal sub,
>
> sub foo {
> return( 42 );
> }
>
> finds OMWTDI as
>
> sub foo {
> 42;
> last;
> }
>
> Somehow, this seems like very natural perl to me.
>
> --
> John Porter
I'd
Damian Conway wrote:
> A C such as:
>
> @array = grep BLOCK LIST
>
> is equivalent to:
>
> @tmp = ();
> foreach (LIST) { push @tmp, $_ if do BLOCK }
> @array = @tmp;
>
> That similarity would not change in any way under the proposal
> (except to be made stronge
John Porter wrote:
> undecorated variable names suffer from this showstopping weakness:
> they can't be interpolated. Unless we change other aspects of perl's
> syntax to support it, that is -- maybe s/${x}/5/. Now, maybe we can
> live without variable interpolation; but I'd bet most perl progr
John Porter wrote:
>
> 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. That's
> not very dwimmy. Loop block
"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
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
Damian Conway wrote:
>
> What you want is:
>
> %newhash = map {yield $_; transform($_)} %oldhash;
>
> This flattens the %oldhash to a sequence of key/value pairs. Then the
> first time the map block is called (i.e. on a key) it immediately
> returns the key. The second time, it resumes
"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
Mark-Jason Dominus wrote:
>
> The perl 5 -> perl 6 translator should replace calls to 'eval' with
> calls to 'perl5_eval', which will recursively call the 5->6 translator
> to translate the eval'ed string into perl 6, and will then eval the
> result.
And that gives us a convenient name space for
> The current ideas tend to converge around
While reading the current rfc199.2 version I imagined another way
to do this. Instead of adding a new escape, what if we could
fiddle with the looping condition?
Given a grep that works like so:
sub mygrep(&@){
local $inde
'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
1 - 100 of 253 matches
Mail list logo