Piers Cawley writes:
: Damian Conway <[EMAIL PROTECTED]> writes:
:
: > Larry explained:
: >
: >> : Umm. didn't you say bare blocks were going away?
: >>
: >> Rule #2 was invoked.
: >>
: >> The current thinking is that any bare block will never be interpreted
: >> as returning a closure. Yo
Damian Conway <[EMAIL PROTECTED]> writes:
> Larry explained:
>
>> : Umm. didn't you say bare blocks were going away?
>>
>> Rule #2 was invoked.
>>
>> The current thinking is that any bare block will never be interpreted
>> as returning a closure. You have to use explicit C or C
>> to retur
Larry explained:
> : Umm. didn't you say bare blocks were going away?
>
> Rule #2 was invoked.
>
> The current thinking is that any bare block will never be interpreted
> as returning a closure. You have to use explicit C or C
> to return a closure.
Or the equivalent of a C, namely:
Larry wrote:
>
> [EMAIL PROTECTED] writes:
> : On 4/3/02 6:44 PM, Damian Conway wrote:
> : > Larry has said very clearly that in Perl 6 there are no "magical" lexical
> : > scopes.
> :
> : Shouldn't this be: "Larry has said very clearly that in Perl 6 there is only
> : one 'magical' lexical scope
[EMAIL PROTECTED] writes:
: On Wednesday 03 April 2002 18:24, Larry Wall wrote:
: >
: > Sure, just say
: >
: > { loop (my $i = intializer(); condition($i); $i = advance($i)) { ... }
: }
: >
: > : Perhaps something like:
: > :
: > : initalizer() -> $i { LOOP: NEXT { $i = advance($i); redo
[EMAIL PROTECTED] writes:
: On 4/3/02 6:44 PM, Damian Conway wrote:
: > Larry has said very clearly that in Perl 6 there are no "magical" lexical
: > scopes.
:
: Shouldn't this be: "Larry has said very clearly that in Perl 6 there is only
: one 'magical' lexical scope: sub() or ->"
It's specific
> {
> my @subs;
> loop (my $x = 0; $x < 10; $x++) {
> push @subs, { $^a + $x };
> }
> $x--;
> # ...
> }
>
> This certainly does *not* DWIM in the current thought. And the silence
> would be much more confusing than a simple syntax error the traditiona
> Larry has said very clearly that in Perl 6 there are no "magical" lexical scopes.
> That is, variables declared in a C control aren't magically in the
> following block.
However, I don't agree with him. It may be more intuitive to newcomers,
but it is a common programming idiom that is used a
On 4/3/02 6:44 PM, Damian Conway wrote:
> Larry has said very clearly that in Perl 6 there are no "magical" lexical
> scopes.
Shouldn't this be: "Larry has said very clearly that in Perl 6 there is only
one 'magical' lexical scope: sub() or ->"
-John
On Wednesday 03 April 2002 18:24, Larry Wall wrote:
>
> Sure, just say
>
> { loop (my $i = intializer(); condition($i); $i = advance($i)) { ... }
}
>
> : Perhaps something like:
> :
> : initalizer() -> $i { LOOP: NEXT { $i = advance($i); redo LOOP if
> : condition($i);} ... }
> :
> : ex
Mark J. Reed wrote:
>
> # Perl 5 code
> for (my $i=0; 1; $i++) {
>
> which would translate into Perl 6 as:
>
>
> loop (my $i=0; 1; $i++) {
>
>
> May I infer from this the return of loop-scoped variables (in
> which the loop control variab
On Thu, Apr 04, 2002 at 09:37:19AM +1000, Damian Conway wrote:
Ah yes, that makes a lot of sense. Thank you.
Andrew
Andrew Wilson wrote:
> I'm sure I'm missing something fairly fundamental, but could someone
> shed more light on the example:
>
> # reduce list three-at-a-time
> $sum_of_powers = reduce { $^partial_sum + $^x ** $^y } 0, @xs_and_ys;
>
> specifically what is being iterated over, what gets bound
Buddha Buck writes:
: At 07:57 AM 04-03-2002 -0800, Larry Wall wrote:
: >Mark J. Reed writes:
: >: loop (my $i=0; 1; $i++) {
: >:
: >
: >No, the scope of $i stays outside, per the previous decision. If you
: >want it inside you can always make $i an official formal parameter:
: >
: >
Hi
I'm sure I'm missing something fairly fundamental, but could someone
shed more light on the example:
# reduce list three-at-a-time
$sum_of_powers = reduce { $^partial_sum + $^x ** $^y } 0, @xs_and_ys;
specifically what is being iterated over, what gets bound and what does
it return?
I tho
On 4/3/02 12:07 PM, Brent Dax wrote:
> John Siracusa:
> # On 4/3/02 3:44 AM, Damian Conway wrote:
> # > Larry indicated to me that blockless declarations of
> # methods and subs would be illegal.
> #
> # What's the motivation for this?
>
> I assume it's to support the Perl 5 blockless style.
Ah
John Siracusa:
# On 4/3/02 3:44 AM, Damian Conway wrote:
# > Larry indicated to me that blockless declarations of
# methods and subs
# > would be illegal.
#
# What's the motivation for this? It seems to me that
# pre-declarations would
# be just as nice (or nicer) as:
#
# module Alpha;
#
At 07:57 AM 04-03-2002 -0800, Larry Wall wrote:
>Mark J. Reed writes:
>: loop (my $i=0; 1; $i++) {
>:
>
>No, the scope of $i stays outside, per the previous decision. If you
>want it inside you can always make $i an official formal parameter:
>
> for 0 .. Inf -> $i { ... }
>
>I t
On 4/3/02 3:44 AM, Damian Conway wrote:
> Larry indicated to me that blockless declarations of methods and subs
> would be illegal.
What's the motivation for this? It seems to me that pre-declarations would
be just as nice (or nicer) as:
module Alpha;
package Beta;
method Gamma::del
Mark J. Reed writes:
:
: # Perl 5 code
: for (my $i=0; 1; $i++) {
:
: which would translate into Perl 6 as:
:
:
: loop (my $i=0; 1; $i++) {
:
:
: May I infer from this the return of loop-scoped variables (in
: which the loop control v
# Perl 5 code
for (my $i=0; 1; $i++) {
which would translate into Perl 6 as:
loop (my $i=0; 1; $i++) {
May I infer from this the return of loop-scoped variables (in
which the loop control variable is magically inser
Damian Conway <[EMAIL PROTECTED]> writes:
>> > Eventually, of course, we'll have to go back and make eveything
>> > copacetic, but at the moment I think most folks would rather have us
>> > working on writing unwritten A's and E's, rather than rewriting
>> > written ones. ;-)
>>
>> Point. Maybe
> > Eventually, of course, we'll have to go back and make eveything
> > copacetic, but at the moment I think most folks would rather have us
> > working on writing unwritten A's and E's, rather than rewriting
> > written ones. ;-)
>
> Point. Maybe someone will step up to plate and do Perl 6 so fa
Damian Conway <[EMAIL PROTECTED]> writes:
>> Good oh. BTW, (and apologies for repeating the question I asked
>> elsewhere) are we going to see an updated Apocalypse 4 incorporating
>> all the changes made to get E4 to work?
>
> Probably not any time soon. Previous Apocalypses haven't been
> updat
> Good oh. BTW, (and apologies for repeating the question I asked
> elsewhere) are we going to see an updated Apocalypse 4 incorporating
> all the changes made to get E4 to work?
Probably not any time soon. Previous Apocalypses haven't been updated
when changes were made.
Eventually, of course,
Damian Conway <[EMAIL PROTECTED]> writes:
> Piers wrote:
>
>> Over on use.perl, someone spotted what looks like a bug in the example
>> program which (if it *is* a bug) is fixed by using unary '*', but
>> that's not what I'm writing about here.
>
> I'll admit I'm not sure whether it is a bug or n
Piers wrote:
> Over on use.perl, someone spotted what looks like a bug in the example
> program which (if it *is* a bug) is fixed by using unary '*', but
> that's not what I'm writing about here.
I'll admit I'm not sure whether it is a bug or not. I've asked Larry for
clarification and will post
Over on use.perl, someone spotted what looks like a bug in the example
program which (if it *is* a bug) is fixed by using unary '*', but
that's not what I'm writing about here.
In the discussion of the yadda yadda yadda operator, Damian says that
... in this example, Err::BadData is *never*
28 matches
Mail list logo