Re: Exegesis 7: Some other tyops

2004-02-28 Thread Damian Conway
Simon Cozens wrote: It may take a *couple* of nights, but the elves will be at work. Bless their pointy little hats/ears/beards/shoes! ;-) Damian

Re: Exegesis 7: Overflow Fields

2004-02-28 Thread Damian Conway
Mark A. Biggar wrote: Expect wouldn't that produce a extra blank line if $text is short? Nope. Formats only generate text lines if at least one of their fields interpolates at least one character. Damian

Re: Exegesis 7: Miscellany

2004-02-29 Thread Damian Conway
d displaying a number with more accuracy than it actually possesses ... should probably be "precision" instead (the degree of granularity to which a number is specified, rather than how 'truthful' the number is). I deliberately avoided "precision" since it's not quite the right word either in this situation. Damian

Re: Exegesis 7: Overflow Fields

2004-02-29 Thread Damian Conway
Mark A. Biggar wrote: What if I want to interpolate an empty string and let the fill characters work? Then you interpolate a single fill character instead of the empty string. Damian

Re: Exegesis 7: Literal '{' in format string

2004-02-29 Thread Damian Conway
Joe Gottman asked: How do you put a literal '{' or '}' into a format string in Perl 6? Do you use a backslash? Yes, a backslash will quote anything (including backslash). Note that you really only need to backslash '{', since '}' isn't special by itself. Damian

Re: Exegesis 7: Overflow Fields

2004-02-29 Thread Damian Conway
* disappear. After all, you wouldn't expect: $str1 = "nothing" . "to" . "see"; to be different from: $str1 = "nothing" . "" . "to" . "" . "see"; Damian

Re: Exegesis 7: Literal '{' in format string

2004-02-29 Thread Damian Conway
Would that need to be a double backslash in a double-quoted string, or is there some new Perl 6 magic that keep it from being needed? No, it would need to be a double backslash in a qq{..} string. Fortunately qq{..} strings are very rarely needed in Cs. Damian

Re: Exegesis 7: Overflow Fields

2004-02-29 Thread Damian Conway
TED]; print "\n"; print map {form "| {[[[} |", $_} @data; Damian

Re: Exegesis 7: Perl6::Slurp

2004-03-01 Thread Damian Conway
I wrote: [Perl6::Slurp] will most likely appear in the next 36 hours. It's now on the CPAN. Damian

Re: Exegesis 7: Perl6::Slurp

2004-03-01 Thread Damian Conway
ing kept up-to-date? Apparently not. Though I can certainly see where Marcel might prefer not to include the more...err..."exploratory" Perl6:: modules, since he'd have to be rereleasing the bundle far too often. Damian

Re: Exegesis 7: Fill Justification

2004-03-01 Thread Damian Conway
don't need to approach OO Perl with a different mindset, after a while you're almost certain to discover one. I don't know of any other programming language that can give you that. Damian

Re: Exegesis 7: Fill Justification

2004-03-01 Thread Damian Conway
Problem solved!!! ;-) Damian (Seriously though, full justification is mainly there for completeness, and in readiness for the day when C is able to handle variable-width text and/or HTML output. In the interim we just aim to produce the most readable results given the constraints imposed

Re: Exegesis 7: Why so many field specifiers?

2004-03-01 Thread Damian Conway
quot;/; return $_; } use Form :field{ /\[.*?\]/ => &translate, /\{ <[][I"]>+ \}/ => { die "Ugly field: $^yuck" }, }; sub form is exported {...} } Or, in Perl 5: package Perl6::Form::Less::Travailed; sub translate { for (shift) { s/^\[/{/; s/\]$/}/; tr/<>|'/[]I"/; return $_; } } use Perl6::Form { field => { qr/\[ .*? \]/x => \&translate, qr/\{ [][I"]+ \}/x => sub { die "Ugly field: $_[0]" } }, }; use Perl6::Export; sub form is exported; 1; Damian

Re: Distributing traits / Rule-matching group properties

2004-03-01 Thread Damian Conway
g & to rules. Indeed, if Larry were to give the word, I'd be delighted to add support for it to the Perl6::Rules module. Damian

Re: Distributing traits / Rule-matching group properties

2004-03-02 Thread Damian Conway
Larry wrote: : Indeed, if Larry were to give the word, I'd be delighted to add support for : it to the Perl6::Rules module. Execute! (I hope that's the right word...) I believe, Captain, the correct word would be: "Engage!" Data^H^Hmian

Re: Compile-time undefined sub detection

2004-03-05 Thread Damian Conway
a UNITEND as well? Damian

Re: Compile-time undefined sub detection

2004-03-05 Thread Damian Conway
are guaranteed to run before any main CHECK, we might want a UNITEND that's guaranteed to execute before any main END. Damian

Re: Mutating methods

2004-03-10 Thread Damian Conway
Luke Palmer wrote: Hooray! That was something I had been worried about. But C doesn't seem to fit visually. What's "questionable" about that? Nothing questionable, but everything hypothetical: captures to the $?foo hypothetical variable Damian

Re: Mutating methods

2004-03-10 Thread Damian Conway
variable: / $foo:=(abc) $bar:=(def) / And since subrules that capture always capture to hypotheticals, we need the same marker there. Damian

Re: Mutating methods

2004-03-10 Thread Damian Conway
arily-hypothesized variables ($foo, $bar, @baz). The syntax we've chosen to do that requires the use of "?" as a secondary sigil on internal variables. So, since named subrules that capture always capture to internal variables, it's natural and consistent to use "?" to indicate capturing subrules as well. Damian

Re: Mutating methods

2004-03-11 Thread Damian Conway
cond is actually *more* likely to be (small-l) laziness than error. There are also cases where something like: $a ||= $b; or: $a += $b; changes the type of value in $a. Should we flag those too? Currently we do warn on the second one if $a can't be cleanly coerced to numeric. Would that be enough for C too, perhaps? Damian

Re: Synopsis 3: quick junction question

2004-03-18 Thread Damian Conway
, under CNF semantics, that's what we get: 1|4 == 1&4 = ((1|4) == 1) & ((1|4) == 4)) = (1|0) & (0|1) = 1 But, under DNF semantics that would be: 1|4 == 1&4 = (1 == (1&4)) | (4 == (1&4)) = (1&0) | (0&1) = 0 Which is wrong. Which, again, is why we use CNF. Damian

Re: Some questions about operators.

2004-03-20 Thread Damian Conway
aQ" not "pitaph". Hey...wait a minute! petaQ chopong? bIQambogh DaqDaq qaHoH!! {{;-) Damian

Re: Some questions about operators.

2004-03-20 Thread Damian Conway
you were you stand!! ;-) BTW, how did you generate that Â, or did you mouse it? I mapped one of my iBook's function keys to it. Damian

Re: Some questions about operators.

2004-03-22 Thread Damian Conway
de to implement Simon's 12 distinct boolean values. However I do think that, now we have C to carry the load of "exists uniquely", Larry will probably decide that C is strictly binary, and hence generalizes to the "parity" form in the n-ary case. I just don't want people to think we neglected to consider the other valid alternatives. Damian

Re: Q: Can colons control backtracking in logical expressions?

2004-04-02 Thread Damian Conway
wing off. All you really need is: if ( specific_condition() ? detail() : general_condition() ) { act(); } ;-) Damian

Re: Q: Can colons control backtracking in logical expressions?

2004-04-02 Thread Damian Conway
(Just not where you might have expected ;-) Damian

Re: A12: default accessors and encapsulation

2004-04-19 Thread Damian Conway
accessor ($attr{type} $attr{$attr_var}) {} " ~ "method get_$accessor () { return $attr{attr_var} } " ~ "has $attr{type} $attr{attr_var}" ; } and then: class Dog { use GetSet; getset $.name; ... } Damian

Re: backticks (or slash, maybe)

2004-04-19 Thread Damian Conway
Right...in Perl 5. In Perl 6, a hash in a numeric context returns the number of entries it contains. So I can readily imagine: sub decimate_hash (%hash is rw) { for 1..%hash/10 { delete %hash{ pick any(keys %hash) }; } } Damian

Re: A12: Required Named Parameters Strike Back!

2004-04-19 Thread Damian Conway
error! No. foo(1, 2); # compile-time error! Yes. foo(a => 1, 2); # compile-time error! Yes. foo(a => 1);# compile-time error! No. foo(a => 5, b => 7); # ok foo(b => 1, a => 2); # ok Yes. Yes. You want: sub foo(+$a is required, +$b is required) { ... } Damian

Re: A12: Exporation

2004-04-23 Thread Damian Conway
-export them as their own. My proposal for that issue is just: module Bar; use Foo «foo»; sub foo is export {...} This works perfectly in Perl 5 under the Perl6::Export module (now on the CPAN): package Bar; use Perl6::Export; use Foo qw(foo); sub foo is export; Damian

Re: A12: Exporation

2004-04-23 Thread Damian Conway
Larry wrote: On Sat, Apr 24, 2004 at 09:52:12AM +1000, Damian Conway wrote: : My proposal for that issue is just: : : module Bar; : : use Foo «foo»; : : sub foo is export {...} That's on the right track, but has some difficulties, insofar as it's not clear that the intent is t

Re: A12: Exporation

2004-04-23 Thread Damian Conway
certain to change as a result of this very thread). Damian

Re: idiom for filling a counting hash

2004-05-18 Thread Damian Conway
Austin Hastings wrote: Hmm. For junctions I was thinking: ++ all([EMAIL PROTECTED]); Which is almost readable. But unfortunately not correct. Junctions are value, not lvalues. This situation is exactly what hyperoperators are for: ++Â [EMAIL PROTECTED]; Damian

Re: idiom for filling a counting hash

2004-05-18 Thread Damian Conway
Luke asked: Er, did the hyper operator's direction flip? I thought it was: ++Â [EMAIL PROTECTED]; My bad. 'Tis indeed. Damian

Re: idiom for filling a counting hash

2004-05-18 Thread Damian Conway
avoid introducing new features that encourage new mistakes. Damian

Re: Semantics of vector operations (Damian)

2004-06-14 Thread Damian Conway
Scott wrote: I'm just waiting for Damian to speak up :-) I'm not at all comfortable with the notion of junctions as lvalues. I've *always* considered a junction to be a special kind of constant, just as a number or a string or a reference is. I have trouble with junctive lvalues

Re: String interpolation

2004-07-20 Thread Damian Conway
} So what about: $foo[$i] $foo{$k} ??? And would slices interpolate? I can't say I'm keen on making {...} special in strings. I felt that the $(...) and @(...) were a much cleaner and more general solution. The prospect of backslashing every opening brace in every interpolated string is not one I relish. Damian

Re: Constructors and mixins

2004-08-22 Thread Damian Conway
drive { given .vehicle { when Truck { goto &SanitationEngineer::drive } default { goto &RaceCar::drive } } } }; Damian

Re: S4: Can PRE and POST be removed from program flow?

2004-09-03 Thread Damian Conway
ity for totally nuking them? macro PRE (&block) {""} macro POST(&block) {""} Damian

Re: Will _anything_ be able to truly parse and understand perl?

2004-11-24 Thread Damian Conway
ree of submatches (including whitespace and comments, if you want them), which you can then reprocess as you wish. Damian PS: Yes, I'll be at OSDC next week (giving the opening and closing keynotes, in fact). And, yes, you're most welcome have a chat with me about Perl 6 sometime during the conference.

Re: Will _anything_ be able to truly parse and understand perl?

2004-11-25 Thread Damian Conway
ly defined fairly broadly). And Perl 6's C will be able to give you the same. In any case, I would like to suspend this debate for a week, as I'll be talking with Damian (hopefully) at YAPC.AU. I'll report back afterwards, having hopefully imparted the full extent of my problem. I b

Re: Lexing requires execution (was Re: Will _anything_ be able to

2004-11-29 Thread Damian Conway
tic lexability you end up with a language with all the nuanced expressive power and syntactic flexibility of, say, Pascal or Java. :-( Damian

Re: Hyper Here-Docs?

2004-11-30 Thread Damian Conway
ou wanted to get a function for each element in an array @a, I suppose you can say: sub makefunc($x){{$x}} @funcarray = @a>>.makefunc; You're attempting to call a sub as a method. You want: @funcarray = »makefunc« @a; Damian

Re: Fwd: Junctive puzzles.

2005-02-10 Thread Damian Conway
t you just *love* that in the guy who's job it is to actually make this stuff work! ;-) Damian

Re: Fwd: Junctive puzzles.

2005-02-10 Thread Damian Conway
x.none {...} Probably. It's entirely possible that, in addition to being built-in list operators, C, C, C, and C are also multimethods on Scalar, Array, and List. Damian

Re: Fun with junctions (was Sets vs Junctions)

2005-02-12 Thread Damian Conway
ence of the autothreading of a junction, is indeterminate. Damian

Re: Fun with junctions (was Sets vs Junctions)

2005-02-12 Thread Damian Conway
unction (did you mean $x.values(), or $x.perl(), or $x.pick() ???) Damian

Re: Fun with junctions (was Sets vs Junctions)

2005-02-11 Thread Damian Conway
nique values seems easy enough @xyz = all(@xyz).values();# remove any duplicate elements of @xyz BTW, I'm pretty sure there will be built-in C and C methods in Perl 6. So that's just: @xyz = uniq @xyz; or better still: @xyz.=uniq; Damian

Re: Fun with junctions (was Sets vs Junctions)

2005-02-11 Thread Damian Conway
select at random from a list, array, or hash I'm sure there are many others. Damian

Re: Fun with junctions (was Sets vs Junctions)

2005-02-12 Thread Damian Conway
ide-effects is autothreaded: use warnings 'autothreading'; Damian

Re: Fun with junctions (was Sets vs Junctions)

2005-02-13 Thread Damian Conway
if they don't. use warnings 'autothreading'; This works for me but I'd make it one of the default set of enabled warnings from a plain "use warnings;" though. I expect it might be. Damian

Re: Fun with junctions (was Sets vs Junctions)

2005-02-13 Thread Damian Conway
n this list: http://www.nntp.perl.org/group/perl.perl6.language/13400 Damian

Re: Extra Operator bits?

2005-02-13 Thread Damian Conway
Yes. The function is called C. See: http://search.cpan.org/~dconway/Perl6-Slurp-0.03/Slurp.pm Damian

Re: Pick's randomness (was Re: Fun with junctions (was Sets vs Junctions))

2005-02-13 Thread Damian Conway
David Storrs OOC'd: OOC, will there be a way to control where C gets its randomness from? (e.g. perl's builtin PRNG, /dev/random, egd, etc) Sure: # Use RBR (Really Bad Randomness) algorithm... temp *rand (Num ?$max = 1) { return $max/2; } my $guess = @data.pick; Damian

Re: Sets vs Junctions

2005-02-14 Thread Damian Conway
, Set $b){ set($a & $b) } multi sub infix:<-> (Set $a, Set $b){ set( $a & none($b) ) } multi sub prefix:<-> (Set $a) { set(none($b) ) } multi sub infix:«<=» (Set $a, Set $b) { true all($a.values) ~~ $b } multi sub infix:«>=» (Set $a, Set $b) { true $a ~~ all($b.values) } } Damian

Re: Junction Values

2005-02-15 Thread Damian Conway
. one($a,$a,$b) == ($a == $b ?? undef :: $b) True. Damian

Re: Containers vs Objects.

2005-02-15 Thread Damian Conway
n) in which it's used. So if: $x = -1 | 11; then: 10 < $x < 0 --> any(10 < -1 < 0, 10 < 11 < 0) --> any(10 < -1 && -1 < 0, 10 < 11 && 11 < 0) --> any(false, false) The mistake is in thinking that the n-ary comparison should be expanded before the junction autothreads. Damian

Re: Junction Values

2005-02-15 Thread Damian Conway
Jonathan Scott Duff wrote: none($a, $a) == undef True. Isn't this one false in the case when $a is undef? Yes. Apologies for not being more precise. Damian

Re: Junction Values

2005-02-15 Thread Damian Conway
none($a,$b)==$d, ) -> none( 0, 0, 1, 1, ) -> false Damian

Re: Junction Values

2005-02-15 Thread Damian Conway
s and operators). Apologies all...and thanks Patrick. Damian

Re: Containers vs Objects.

2005-02-15 Thread Damian Conway
any( $ref.meth1(10) + -1, $ref.meth1(10) + 10 ) ) Definitely the latter. As Einstein avowed: "no spooky action at a distance!" ;-) Damian

Kudos to Autrijus

2005-02-16 Thread Damian Conway
rijus's work both amazing and amazingly useful: as a way of exploring the deeper design and implementation issues, and also as a way for people to start playing with (and experiencing the real power of) Perl 6. Well done, Autrijus! Damian

Re: Fun with junctions (was Sets vs Junctions)

2005-02-17 Thread Damian Conway
ass XML is Language { method serialize($data) { ... } } # etc. Damian

Re: Fun with junctions (was Sets vs Junctions)

2005-02-18 Thread Damian Conway
2-ary &*coerce:as 2-ary &*coerce:as # etc. or (more likely, given the dynamic nature of Perl) a single entry that's a "trampoline" that instantiates particular parameterizations of the generic class as they're needed: 2-ary &*coerce:as Damian

Re: Junction Values

2005-02-18 Thread Damian Conway
ead. And we'll happily give you a C pragma so you can be emphatic about not wanting them. But bowdlerizing the concept of junctions isn't the answer. Damian

Re: Junction Values

2005-02-19 Thread Damian Conway
k into the discussion. Damian

Re: Junction Values

2005-02-19 Thread Damian Conway
# At the top of the program... no junctions 'assignment'; # Junctive constants okay # and then... if is_prime(any(@x)) {...} # Explicitly threaded or, even more thread-explicitly: # At the top of the program... no junctions 'assignment'; # Junctive constants okay # and then... if any is_prime«(@x) {...} # Explicitly threaded Damian

Re: Junction Values

2005-02-19 Thread Damian Conway
y implicit threading. Damian

Re: precedence for x and ~

2005-02-19 Thread Damian Conway
~<< ~>> additive+ - ~ +| +^ ~| ~^ Damian

Re: Lingering questions about Junctions.

2005-02-19 Thread Damian Conway
l. For example: sort 1|10, 5|6, 11|0 in which *any* permutation of the list is a plausible sort. So sorting junctions isn't necessarily always meaningful. Damian

Re: Junction Values

2005-02-20 Thread Damian Conway
but I'm afraid I have to bow out of it now. Damian PS: FWIW, I'd have absolutely no objection to us adding a fifth core junctive type (perhaps C, perhaps just C ;-) that has *no* associated predicate, but which implements full set semantics: my $x = set(1..3);

Re: Junction Values

2005-02-20 Thread Damian Conway
Nicholas Clark wrote: On Sun, Feb 20, 2005 at 07:41:16PM +1100, Damian Conway wrote: Given this: my $x = set(1..3); my $y = set(1,3,5,7,9); my $n = 2; $x | $y # set(1,2,3,5,7,9) $x & $y # set(1,3) $x - $y # set(2)

Re: Question about pairs

2005-02-21 Thread Damian Conway
ingified if it's a valid identifier, but both the key and the value can be any kind of Perl data structure. They are accessed via the pair object's C and C methods... Damian

Re: Slurpy nullary vs nonslurpy nullary

2005-02-21 Thread Damian Conway
t C. > In pugs, currently it's ordered by local vs global, then by subtyping > distance of invocants, then finally by then finally by the order of > creation of CODE objects. That's just a working heuristics, though. The dispatch resolution process is described in A12, under "Calling via Multiple Dispatch". It's close to what you describe above, except the "local vs global" distinction is a little more complex, and the final discrimination is via C, not via C object creation sequence. Damian

Re: Junctions, Sets, and Threading.

2005-02-22 Thread Damian Conway
ngs. The Prime Junction Rule was the big > revelation I had the other night. The rest of this was the logical > consequence spawned off that single thought to make it a complete idea. > > I think that overall in this process I've done the following: > - Kept the real power of Junctions intact. > - Provided fairly strong protection for newbies, without sacrificing > power. > - Kept Nasty surprises to a minimum. > - Got rid of the need for "half on" features. > - Provided back any power that the Prime Rule removed through sets and > expanded hyper ops. Leaving aside the Unnecessary Restriction on junctions (a.k.a. Prime Rule ;-), the main downside is that we would be multiplying our entities. We'd need to be certain that the increased cognitive load is worth the benefits. Damian

Re: Junctions, Sets, and Threading.

2005-02-22 Thread Damian Conway
@b[2]), foo(@a[1], @b[0]), foo(@a[1], @b[1]), foo(@a[1], @b[2]), foo(@a[2], @b[0]), foo(@a[2], @b[1]), foo(@a[2], @b[2]); Yeah, that was the bit that nearly has me convinced. ;-) Damian

Re: Slurpy nullary vs nonslurpy nullary

2005-02-22 Thread Damian Conway
atal error on ambiguity, then. But only if there isn't a variant marked C. Damian

Re: Junctions, Sets, and Threading.

2005-02-22 Thread Damian Conway
Aldo Calpini wrote: Damian Conway wrote: >@s = 'item' _ [EMAIL PROTECTED]; That's: @s = 'item »_« @x; (just checking that my unerstanding is correct, don't want to be nitpicking :-) assuming that you meant to prepend the string "item" to each

Re: Junctions, Sets, and Threading.

2005-02-22 Thread Damian Conway
junctions. Without it, you're free to ignore that predicate Yep. If you're ignoring the predicate, a junction is just a list of values. No. You can ignore the predicate because you don't need it *yet*. Treat it as such. A list. Hyperquotes will deal with those situations nicely, th

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-17 Thread Damian Conway
bread-winning must, for the moment, take precedence over most of my public activities). Damian -cut--cut--cut--cut--cut- There would be a single consistent rule that says that every POD block (except raw text blocks) has one of the following three equivalen

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-17 Thread Damian Conway
dear! =ray -- A ravening beam of destruction =me -- A name I call my invocant =far -- A long, long way to Australia =sew -- What I do with contention =LA -- A place to follow freaks =tee -- I pipe to double streams Damian

Re: Coroutine Question

2005-05-04 Thread Damian Conway
example { coro {...} } my $example = example(); my $example2 = example(); $example(); # 1 $example(); # 2 $example2(); # 1 $example(); # 3 Damian

Re: Coroutine Question

2005-05-04 Thread Damian Conway
# 6 7 8 9 10 50 51 52 53 54 print $co(10);# 55 56 print $co(10);# undef print $co(10);# exception Damian

Re: reduce metaoperator

2005-05-04 Thread Damian Conway
t;reduce" and so get all the handy metaoperators (sum, product, sum-of-squares, monotonicity, first-true, first-defined) we've been missing to date. Damian [*] Okay, that's not strictly true. Evil Damian is already contemplating how to implement n-ary reduction in Perl 5. Bwah-ha-ha-ha!

Re: Nested captures

2005-05-09 Thread Damian Conway
I will be releasing a full description of the new capturing semantics in the next day or two. It will be appended to the appropriate Synopsis, but I'll also post it here. It may be as soon as tomorrow, but I'm away teaching this week, so my time is restricted. Damian

Re: Nested captures

2005-05-09 Thread Damian Conway
Autrijus wrote: /me eagerly awaits new revelation from Damian... Be careful what you wish for. Here's draft zero. ;-) Note that there may still be bugs in the examples, or even in the design. @Larry has thrashed this through pretty carefully, and Patrick has implemented it for PGE, but it&#x

Re: Nested captures

2005-05-09 Thread Damian Conway
I think it would be better to leave the multi-dot syntax to be visually unambiguous as a version number. Damian

Re: Nested captures

2005-05-09 Thread Damian Conway
"I love bug-eyed monsters" } Yes, I think this is the right answer. Much better not to multiply entities without necessity. Well done, Patrick! Damian

Re: Nested captures

2005-05-10 Thread Damian Conway
t; To: $"; DC> } since files and dirs are internal aliases (their names are in <>), shouldn't those match accesses be $/ and $/? Sure. Just as $42 is a shorthand for $/[42], so too $ is a shorthand for $/. Damian

Re: Nested captures

2005-05-11 Thread Damian Conway
with Perl 5's $1, $2, $3... But that's only the opinion of one(@Larry), not of $Larry. Damian

Re: Nested captures

2005-05-11 Thread Damian Conway
rns a C object whose ... string value is the complete substring that was matched by the entire rule... So the old $0 is just ~$/ Damian

Re: Nested captures

2005-05-11 Thread Damian Conway
, or some other kind of $n-1 value. If C (and C, C, C) was a "subtract one" operator, you could write: my $n = prompt "How many elems? "; print @array[1st..($n)th]; instead of the out-by-one-prone: print @array[0..$n-1] Hmmm. Damian

Re: Numification of captured match

2005-05-12 Thread Damian Conway
hy @1 shouldn't mean $1[] and %1 shouldn't mean $1{}. It *does*. According to the recent capture semantics document: > Note that, outside a rule, C<@1> is simply a shorthand for C<@{$1}>, and: > And, of course, outside the rule, C<%1> is a shortcut for C<%{$1}>: Damian

Re: Numification of captured match

2005-05-12 Thread Damian Conway
orthogonal for practical use. ;-) Damian

Re: C<::> in rules

2005-05-13 Thread Damian Conway
rue" if $p; # :p with no argument $p //= 42; # :p with no argument ... } Yes, I was thinking along the same lines. C as a default seems to be more accurate and useful than C. Damian

Re: ^method ?

2005-05-14 Thread Damian Conway
g out in Perl, that something is $_. Now we're proposing unary dot as a method call in which you can leave something out. If you were an average Perl programmer and had to guess what that something was, what would you guess? Damian

Re: Plethora of operators

2005-05-14 Thread Damian Conway
pply a series of properties to a value: $propped = [but] $value, @properties; Personally I think a metaoperator with that many uses is more than Swiss-Army enough to be in the core of Perl 6. Damian

Re: junctions vs English negatives.

2005-05-14 Thread Damian Conway
negative comparisons against explicit (compile-time) junctions. That is, against expressions that explicitly use |/&/^ or any/all/one/none. Negative comparisons against implicit (run-time) junctions: if $note != $bad_note {...} still have to be allowed. Damian

Re: Plethora of operators

2005-05-14 Thread Damian Conway
Larry wrote: Actually, I think Damian's original formulation is sufficiently clear. Me too! ;-) I think that a standard [.] abbreviation for all postcircumfix operators within [op] reductions would be a useful bit of dwimmery. Damian

<    1   2   3   4   5   6   7   8   9   10   >