Re: S04-related closure question

2008-09-22 Thread Patrick R. Michaud
On Sat, Jul 12, 2008 at 09:52:34PM -0500, Patrick R. Michaud wrote: > What would be the expected output from the following? > > my $a = foo(); > my $b; > > { > my $x = 1; > sub get_x() { return $x; } > sub foo() { return &get_x; } > $b = foo(); >

Re: S04 - forbidden coding-style

2006-07-30 Thread Udo Güngerich
Am Mittwoch, 26. Juli 2006 03:18 schrieb Ruud H.G. van Tol: > Thomas Wittek schreef: > > > > What I wanted to say is that it would annoy me, if almost all > > operators and control-flow keywords are lowercase but a hand full of > > them has to be written uppercase. Hi, I suppose the above is a s

Re: S04 - forbidden coding-style

2006-07-25 Thread Ruud H.G. van Tol
Thomas Wittek schreef: > Actually I don't know all of them but most seem to be (part of) > identifiers, not operators. Of course they are reserved words. > > What I wanted to say is that it would annoy me, if almost all > operators and control-flow keywords are lowercase but a hand full of > them

Re: S04 - forbidden coding-style

2006-07-25 Thread Thomas Wittek
Markus Laire schrieb: >> Operators/reserved words should be lowercase. Period. ;) >> I think that this would heavily break consistency, annoying new users. > > There are already many uppercase reserved words in perl6: > > Pseudo-packages from S02 > MY, OUR, GLOBAL, OUTER, CALLER, CONTEXT, SUPER,

Re: S04 - forbidden coding-style

2006-07-25 Thread jerry gay
On 7/25/06, Thomas Wittek <[EMAIL PROTECTED]> wrote: > Bearing that in mind, would the eye-socket-burning > > return $foo > IF $something; > > really be so bad? Operators/reserved words should be lowercase. Period. ;) I think that this would heavily break consistency, annoying new users.

Re: S04 - forbidden coding-style

2006-07-25 Thread Markus Laire
On 7/25/06, Thomas Wittek <[EMAIL PROTECTED]> wrote: > Bearing that in mind, would the eye-socket-burning > > return $foo > IF $something; > > really be so bad? Operators/reserved words should be lowercase. Period. ;) I think that this would heavily break consistency, annoying new users.

Re: S04 - forbidden coding-style

2006-07-25 Thread Thomas Wittek
> Bearing that in mind, would the eye-socket-burning > > return $foo > IF $something; > > really be so bad? Operators/reserved words should be lowercase. Period. ;) I think that this would heavily break consistency, annoying new users. -Thomas

Re: S04 - forbidden coding-style

2006-07-24 Thread Kris Shannon
On 7/22/06, Aaron Crane <[EMAIL PROTECTED]> wrote: Larry Wall writes: > Maybe we should just make statement modifiers uppercase and burn out > everyone's eye sockets. :) ... Bearing that in mind, would the eye-socket-burning return $foo IF $something; really be so bad? This has

Re: S04 - forbidden coding-style

2006-07-24 Thread Paul Hodges
I know, shoot me -- but just so we've discussed it and put it to bed, maybe :if or _if or fi? --- Aaron Crane <[EMAIL PROTECTED]> wrote: > Larry Wall writes: > > Maybe we should just make statement modifiers uppercase and burn > out > > everyone's eye sockets. :) > > I like statement modifie

Re: S04 - forbidden coding-style

2006-07-22 Thread Aaron Crane
Larry Wall writes: > Maybe we should just make statement modifiers uppercase and burn out > everyone's eye sockets. :) I like statement modifiers, and I want them to continue to exist in Perl 6. But it seems to me that a lot of the most awkward decisions about Perl 6 syntax are awkward precisely b

Re: S04 - forbidden coding-style

2006-07-21 Thread Trey Harris
In a message dated Fri, 21 Jul 2006, Ruud H.G. van Tol writes: Larry Wall schreef: Maybe we should just make statement modifiers uppercase and burn out everyone's eye sockets. :) Or maybe { }. while $x ; Actually, can't that be made to work already (already by the language spec, not

Re: S04 - forbidden coding-style

2006-07-21 Thread Ruud H.G. van Tol
Larry Wall schreef: > Maybe we should just make statement modifiers > uppercase and burn out everyone's eye sockets. :) Or maybe { }. while $x ; -- Groet, Ruud

Re: S04 - forbidden coding-style

2006-07-21 Thread Larry Wall
On Fri, Jul 21, 2006 at 12:07:52PM -0500, Jonathan Scott Duff wrote: : Or just give them some sort of syntactic marker ... I know! : : loop { : ... : } : :while $loopy; : : eat :if $hungry; : go_postal :when $aggravation > 10; : .sleep :until .rested; : : *Everybo

Re: S04 - forbidden coding-style

2006-07-21 Thread Jonathan Scott Duff
On Thu, Jul 20, 2006 at 10:18:57AM -0700, Larry Wall wrote: > It ain't easy. Maybe we should just make statement modifiers uppercase > and burn out everyone's eye sockets. :) Or just give them some sort of syntactic marker ... I know! loop { ... } :while $loopy; eat :if

Re: S04 - forbidden coding-style

2006-07-21 Thread Larry Wall
On Thu, Jul 20, 2006 at 05:03:32PM +0100, Smylers wrote: : Markus Laire writes: : : > S04 seems to say that a style like this can't be used by : > perl6-programmers: : > : > loop : > { : >... : > } : > while $x; : > : > I like this style, as it lines up both the keywords and the curlies. :

Re: S04 - forbidden coding-style

2006-07-21 Thread Markus Laire
On 7/20/06, Smylers <[EMAIL PROTECTED]> wrote: Markus Laire writes: > S04 seems to say that a style like this can't be used by > perl6-programmers: > > loop > { >... > } > while $x; > > I like this style, as it lines up both the keywords and the curlies. As of yesterday you can get very c

Re: S04 - forbidden coding-style

2006-07-20 Thread Smylers
Markus Laire writes: > S04 seems to say that a style like this can't be used by > perl6-programmers: > > loop > { >... > } > while $x; > > I like this style, as it lines up both the keywords and the curlies. As of yesterday you can get very close to this by putting a space-eating backslas

Re: S04

2006-07-02 Thread Audrey Tang
在 2006/7/1 下午 6:08 時,Tom Allison 寫到: I picked this up at the YAPC and made some markups on it. Apologies that it is not in a diff format, but that's going to come with practice. ... is there a file attachment somewhere? :-) I got stuck on some of the intended behaviors and prohibited

Re: S04 default { } bug?

2005-10-25 Thread Larry Wall
On Mon, Oct 24, 2005 at 07:39:23AM +0300, Ilmari Vacklin wrote: : Hi, : : S04 says thus: : : The default case: : : default {...} : : is exactly equivalent to : : when true {...} : : However, that parses to: : : if $_ ~~ bool::true { ...; leave } : : Which is not

Re: S04 default { } bug?

2005-10-24 Thread Luke Palmer
On 10/23/05, Ilmari Vacklin <[EMAIL PROTECTED]> wrote: > Hi, > > S04 says thus: > > The default case: > > default {...} > > is exactly equivalent to > > when true {...} > > However, that parses to: > > if $_ ~~ bool::true { ...; leave } > > Which is not executed if $_ is

Re: S04 -- closure traits clarification

2005-05-02 Thread Larry Wall
On Mon, May 02, 2005 at 03:20:03PM -0700, Larry Wall wrote: : Probably does something like: : : &?BLOCK does First; # no-op if it already does First : &?BLOCK.firstlist.push(&block); Probably shouldn't use up a normal name like "First" for that. Maybe we can just reuse the trait name as

Re: S04 -- closure traits clarification

2005-05-02 Thread Larry Wall
On Fri, Apr 29, 2005 at 10:57:01AM -0500, David Christensen wrote: : 1) What type of introspection, if any, are we providing to the language : level? I.e., are we providing something along the lines of : : %traits = &?BLOCK.traits : : where %traits is keyed on trait name (FIRST, LAST, whate

Re: S04 -- closure traits clarification

2005-04-29 Thread Luke Palmer
David Christensen writes: > Greetings, > > In trying to hack closure trait support into pugs, I have some > questions about closure traits, variable with "will" traits and > introspection. (Apologies if some of this has been discussed on the > list before -- I'm just going off of the synopses,

thank you for clarification (was Re: S04)

2005-02-11 Thread David Storrs
On Thu, Feb 10, 2005 at 09:45:59AM -0800, Larry Wall wrote: > That's spelled > > loop { > $foo = readline; > ...do stuff with $foo... > } while ( $foo ); > > these days. > > Larry Cool, perfect. Thanks. --Dks -- [EMAIL PROTECTED]

Re: S04

2005-02-10 Thread Aaron Sherman
On Thu, 2005-02-10 at 11:59, Luke Palmer wrote: > There's been some discussion about bringing a syntax back for that > recently, but I haven't really been paying attention. Anyway, this is > pretty clear: > > loop { > $foo = readline; > do { stuff :with($foo) }; > las

Re: S04

2005-02-10 Thread Larry Wall
On Thu, Feb 10, 2005 at 07:39:54AM -0800, David Storrs wrote: : Given that Perl 6 won't support an actual do-while loop a la C++ (and : yes, I know that Perl5 didn't either), how would you accomplish that? : That is, I'd like to have a loop that runs once, then checks its : condition to see if it s

Re: S04

2005-02-10 Thread Luke Palmer
David Storrs writes: > Given that Perl 6 won't support an actual do-while loop a la C++ (and > yes, I know that Perl5 didn't either), how would you accomplish that? > That is, I'd like to have a loop that runs once, then checks its > condition to see if it should repeat and continues to repeat as l

Re: S04

2005-02-10 Thread David Storrs
Given that Perl 6 won't support an actual do-while loop a la C++ (and yes, I know that Perl5 didn't either), how would you accomplish that? That is, I'd like to have a loop that runs once, then checks its condition to see if it should repeat and continues to repeat as long as the condition is true.

Re: S04

2005-01-29 Thread Juerd
Thank you for your fast and detailed reply. Larry Wall skribis 2005-01-29 11:08 (-0800): > On Sat, Jan 29, 2005 at 05:59:40PM +0100, Juerd wrote: > : Can last/redo be used outside loops? (i.e. with if or given) > No, though of course what "loop" means is negotiable. Effectively, > anything that c

Re: S04

2005-01-29 Thread Larry Wall
On Sat, Jan 29, 2005 at 05:59:40PM +0100, Juerd wrote: : Some questions after reading S04: : : : Can last/redo be used outside loops? (i.e. with if or given) No, though of course what "loop" means is negotiable. Effectively, anything that captures the appropriate control exceptions is a loop. B