Re: Return with no expression

2004-08-24 Thread Jonadab the Unsightly One
Alexey Trofimenko [EMAIL PROTECTED] writes: I wanna ask, could be there in perl6 any difficulties with recognizing C:: as part of C... ?? ... :: ... and C:: as module sigil? Does it involve some DWIM? Among other things, the ?? will tip off the parser that it's looking for an expression

Re: Return with no expression

2004-08-24 Thread Brent 'Dax' Royal-Gordon
Aaron Sherman [EMAIL PROTECTED] wrote: I've always thought that particular bit of sugar was rather dangerous. I'd even prefer a longhand: $foo either 0 or split(); The overloading of 'or' there is (IMHO) far more dangerous than the overloading of '::' being discussed in this thread. --

Re: Progressively Overhauling Documentation

2004-08-24 Thread Mark Overmeer
* Juerd ([EMAIL PROTECTED]) [040823 19:46]: David Green skribis 2004-08-23 11:30 (-0600): One of the selling features (or one of the features that is always sold) of POD is that you can mix it with your code. Except nobody does, at least I can't recall that last time I saw a module that

Re: Progressively Overhauling Documentation

2004-08-24 Thread Clayton Scott
David Green wrote: In [EMAIL PROTECTED], [EMAIL PROTECTED] (Aaron Sherman) wrote: This bit of POD made me think about POD's lack of tabular formatting, a common idiom in technical documentation. I know POD is still in the wings, as it were, but I wanted to say this before I forget /me

Re: Return with no expression

2004-08-24 Thread Aaron Sherman
Luke Palmer wrote: Aaron Sherman writes: $foo??0::split() ouch! Yeah, seriously. I mean, what a subtle bug! It would take him hours to figure out went wrong! Sarcasm is an ugly thing. One thing that I just thought of that could be intersting: $foo = 'a' or 'b' My thought was that

Re: Return with no expression

2004-08-24 Thread Dave Whipp
Brent 'Dax' Royal-Gordon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Aaron Sherman [EMAIL PROTECTED] wrote: I've always thought that particular bit of sugar was rather dangerous. I'd even prefer a longhand: $foo either 0 or split(); The overloading of 'or' there is

How to build ??/:: without ::

2004-08-24 Thread Aaron Sherman
On Tue, 2004-08-24 at 08:24, Aaron Sherman wrote: $foo = 'a' or 'b' I was too focused on the idea of C??/C:: as a pair-like construct, and I missed what should have been obvious: a ?? b :: c IS given a { when true { b } default { c } } Which S4 tells us is: a -

Re: Return with no expression

2004-08-24 Thread Aaron Sherman
On Tue, 2004-08-24 at 11:50, Dave Whipp wrote: You're assuming that Ceither in a ternary operator. It could be a binary operator, defined as {eval $RHS if $LHS; return $LHS}. For that interpretation, one might choose a different name (e.g. Cimplies). We could actually define ?? as a binary

Re: Return with no expression

2004-08-24 Thread Graham Barr
On 24 Aug 2004, at 22:14, Aaron Sherman wrote: You don't HAVE to use auto-topicalization. You CAN always write it long-hand if you find that confusing: for @words - $word { given ($chars($word) 70) - $toolong { say abbreviate($word) ?? $word;

Re: Return with no expression

2004-08-24 Thread Adam D. Lopresto
On Tue, 24 Aug 2004, Aaron Sherman wrote: On Tue, 2004-08-24 at 11:50, Dave Whipp wrote: You're assuming that Ceither in a ternary operator. It could be a binary operator, defined as {eval $RHS if $LHS; return $LHS}. For that interpretation, one might choose a different name (e.g.