Re: generic ordinal-relevant operators

2006-11-16 Thread TSa
HaloO Larry, you wrote: You guys should read The Search for the Perfect Language, by Umberto Eco. It would disabuse you of the notion that perfect orthogonality is possible or even desirable. I'm sorry if my contributions to this thread are annoying. But one question remains that might

Re: generic ordinal-relevant operators

2006-11-16 Thread Smylers
TSa writes: ... one question remains that might actually make Duncan's proposal pointless. Didn't Larry actually accept Darren's proposal and add the Cbefore and Cafter operators? Are the comparison operators available for overloading just like any other operator Yes. This feature is used

Re: List assignment question

2006-11-16 Thread Jonathan Rockway
Mark J. Reed wrote: I distinctly recall having to do things like (my $a, undef, my $b) to avoid errors because you can't assign to undef. Maybe I'm just hallucinating. Maybe :) $ perl -Mstrict -e 'my ($a, undef, $b) = 1..3; print $a $b\n;' 1 3 This works as far back as v5.6.0 (which is the

Re: generic ordinal-relevant operators

2006-11-16 Thread Jonathan Lang
Smylers wrote: Didn't Larry actually accept Darren's proposal and add the Cbefore and Cafter operators? Yes. He also accepted the proposal to add min and max operators - although I'm unsure why they weren't included as functions/methods instead. It seems more natural to me to say 'max($a,

Re: List assignment question

2006-11-16 Thread Jonathan Rockway
Vincent Foley wrote: Hello everyone, I was toying around with Pugs and I tried the following Perl 5 list assignment my ($a, undef, $b) = 1..3; Which gave me the following error message: Internal error while running expression: *** Unexpected , expecting word

Re: List assignment question

2006-11-16 Thread Larry Wall
On Wed, Nov 15, 2006 at 10:28:41AM -0600, Jonathan Rockway wrote: : For reference, this sort of operation works if you write it on two : lines, like: : : my ($a, $b); : ($a, undef, $b) = 1..3; : say $a is 1 and $b is 3; : : I'll look around in the source and see if I can make this

Re: generic ordinal-relevant operators

2006-11-16 Thread Paul Seamons
Yes. He also accepted the proposal to add min and max operators - although I'm unsure why they weren't included as functions/methods instead. It seems more natural to me to say 'max($a, $b, $c)' or '($a, $b, $c).max' instead of '[max] $a, $b, $c' or '$a max $b max $c'. Although it _does_

Smart Matching clarification

2006-11-16 Thread Jonathan Lang
Looking through the table provided, I ran across the following: $_ $xType of Match ImpliedMatching Code == = == HashHash hash keys identical match if $_.keys.sort »eq« $x.keys.sort My understanding is that