Hi all. I missed out on the original RFC process; it was over before I even heard of perl6. Anyway, there's something I want to contribute to the Perl community. I've had an idea about control structures which I've never seen anywhere else, so I guess I'm the inventor :). I hope this is the appropriate forum to do it; it looks to me like it is, but I could be wrong.
I was planning to put them all in one message, but then I thought it would be more useful to separate them, so I'll do that instead; they'll make much more sense if you read them in order. Anyway, the first part is the given statement modified to fit this idea. It'd run something like this: -------------------------------------------------------------- given ($this) { when $that_happens { "Have a party" } when $that_doesnt_happen { "Sing" } all { # Do something } any { # Do something else } some { # Do something other } none { # Do something however } } -------------------------------------------------------------- The basic idea is that you have two "special" variables which I will, just for now, call $truecount and $falsecount. Basically, every time one of the "when" clauses comes up true, it increments truecount; whenever one comes up false, it increments $falsecount. The blocks below the given get evaluated under the following conditions all: $falsecount == 0 any: $truecount > 0 some: $falsecount > 0 none: $truecount == 0 So anyway, "none" replaces the old "default" option, and the others can be useful from time to time too :). Hope this is useful. :) --------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: [EMAIL PROTECTED] | I am | --------------------------------------------------------------------- ----BEGIN GEEK CODE BLOCK---- Version 3.1 GCS d? s: a-- C++>++++$ US+ P++ L++ E- W+++ N+ w+> M-- V- Y+>++ PGP->++ R(+) !tv B++ DI++++ D+ G e>++ h!/* y- -----END GEEK CODE BLOCK-----