Re: for ... else

2007-03-04 Thread Daniel Brockman
What about this? given @foo { for $_ -> $x { ... } when .empty { ... } } You can reverse the order if you want: given @foo { when .empty { ... } for $_ -> $x { ... } } I don't like C<$_>, but I can't think of a way to get rid of it. -- D

Re: lvalue reverse and array views

2005-11-19 Thread Daniel Brockman
@bar, or throwing an exception if the new element is not a Pair? (What is Perl's pair terminology, by the way?) -- Daniel Brockman <[EMAIL PROTECTED]>

Re: Hyphens vs. Underscores

2005-11-17 Thread Daniel Brockman
rscores should probably warn about $i+1 and $i*1. I would still use that package, and your example doesn't bother me personally. I would never write $i-1 or $i+1. But I wouldn't want to be the one to have to reply to all the complaints about the unintuitive meaning of

Re: Hyphens vs. Underscores

2005-11-17 Thread Daniel Brockman
s. Having used that style for a while, I don't see any good reason to write them smashed together. > trying to change that in a scoped way will only cause pain > somewhere else. If so, then that is a symptom of a wider problem. I mean, wasn't Perl 6 supposed to make this kind of hack a breeze? -- Daniel Brockman <[EMAIL PROTECTED]>

Re: Hyphens vs. Underscores

2005-11-16 Thread Daniel Brockman
t about this. I would be happy if the standard distribution came with a package that enabled the hyphenated identifiers syntax in the lexical block: use hyphenated_identifiers; Hopefully the name of that package won't actually have any underscores in it. -- Daniel Brockman <[EMAIL PROTECTED]>

Re: Hyphens vs. Underscores

2005-11-16 Thread Daniel Brockman
usly: just override the Perl 6 > grammar's identifier rule. All the edge cases will be resolved by the > longest token principle, so `foo-bar-baz` will be an identifier. Yes, it's very comforting to know that even if Perl 6 won't have this feature built in, it will be so amazingly easy to implement in a beautifully clean way. But what about class Foo::Bar-2.10-cpan:BRENTDAX? -- Daniel Brockman <[EMAIL PROTECTED]>

Re: Hyphens vs. Underscores

2005-11-16 Thread Daniel Brockman
n, but the problem will not arise unless people start mixing these two styles --- something which is very obviously not a good idea. Besides, another couple of hundred lines down, you might (but you probably won't) find the following code: eval ("foo", "bar").join(&q

Hyphens vs. Underscores

2005-11-16 Thread Daniel Brockman
parses code looking for identifiers. You can find that here: <http://www.brockman.se/software/hyphen-ruby/> Finally, I realize that this is a religious issue, I hope that I have not stepped on anybody's toes, and I humbly ask that you approach this discussion with an open mind. Kind regards, -- Daniel Brockman <[EMAIL PROTECTED]>

The value of +"hello"

2005-08-16 Thread Daniel Brockman
Exegesis 3 contains this snippet, my $inflation; print "Inflation rate: " and $inflation = +<> until $inflation != NaN; but the rule that +"hello" evaluates to NaN is "no longer" mentioned in S03, according to Autrijus. He suggested I post here t