Damian Conway writes:
> Hmm. I think I may have missed Luke's point. Which was (presumably):
> what if C<$opus.write_to_file($file);> validly returns C?
>
> In which case I think we just fall back to:
>
> try{$opus.write_to_file($file); CATCH {die "Couldn't write to $file:
> $!"}}
>
Honestly you guys, I'm not trolling. I'm just getting a lot of ideas
recently. :-)
The C comma has always bugged me, but its function is indeed useful
(many times I use C in its place, if I know the left side will
always be true). I don't know whether it's staying or not (I've heard
rumors of bot
On Mon, Nov 24, 2003 at 05:00:38PM -0700, Luke Palmer wrote:
> The C comma has always bugged me, but its function is indeed useful
> (many times I use C in its place, if I know the left side will
> always be true). I don't know whether it's staying or not (I've heard
> rumors of both), but I'd sugg
> Honestly you guys, I'm not trolling. I'm just getting a lot of ideas
> recently. :-)
Honestly, I'm not an expert on Perl 6 syntax. (And I actually am being
honest... ;-) But I'll throw in my 2 cents anyway. :-)
>
>
> This word: C.
>
> So, from a recent script of mine:
>
> my $n;
>
At 04:40 PM 11/24/2003 -0800, Michael G Schwern wrote:
I definately agree that this is used rarely enough that it should be a word
and not a single character.
"then" sounds too much like "if/then" which is confusing. Its exactly
the opposite from what you're trying to convey.
It also doesn't conve
I'm very much in favour of heteronymifying scalar vs list comma too.
Or else eliminating one of them.
Schwern wrote:
"then" sounds too much like "if/then" which is confusing.
Why? "if/then" has never been Perl syntax.
It also doesn't convey anything about "evaluate the left hand side, ignore
th
Luke --
I guess it might be nice to just do that with a block...
my $n;
while { $n++; @accum } < $total {
...;
}
since we already have a nice do-this-then-do-this syntax.
Sure, it looks a little weird in a for loop:
for ($i = 0; $i < $X; { $i++; some_func() }) {
...;
}
but
On Tue, Nov 25, 2003 at 12:21:13PM +1100, Damian Conway wrote:
> >"then" sounds too much like "if/then" which is confusing.
>
> Why? "if/then" has never been Perl syntax.
A lot of people read "if (foo) { bar }" as "if foo then bar" in their heads.
I'm one of them. Its not a previous syntax thing
Schwern observed:
A lot of people read "if (foo) { bar }" as "if foo then bar" in their heads.
I'm one of them. Its not a previous syntax thing, its a translation to
English thing.
Fair enough. It's not something I do myself, but I can see that many people
might prefer to.
This may be a conseq