Re: Dallas.p6m

2009-03-19 Thread Graham Barr
On Mar 18, 2009, at 5:26 PM, fREW Schmidt wrote: s1n and I decided that we would start Dallas.p6m as we are close to each other geographically speaking. We are meeting tomorrow (Thursday, March 19, 7:00PM) at a coffee shop with free wifi. The address is 985 W Bethany Dr Allen, TX 75013.

Re: Temporal changes

2009-02-24 Thread Graham Barr
On Feb 23, 2009, at 3:56 PM, mark.a.big...@comcast.net wrote: Instant Moment Point PointInTime Timestamp Event Jiffy Time Juncture

Re: WTF? - Re: method calls on $self

2005-07-15 Thread Graham Barr
On Thu, July 14, 2005 10:47 am, Autrijus Tang said: If this were a straw poll, I'd say... 1. Meaning of $_ .method should mean $_.method always. Making it into a runtime error is extremely awkward; a compile-time error with detailed explanataion is acceptable but suboptimal.

Re: Open and pipe

2005-05-05 Thread Graham Barr
On May 4, 2005, at 8:13 AM, Uri Guttman wrote: AS Why? Because IO::Socket.new takes parameters that are built out of its AS entire inheritance tree, so a change to IO::Handle might radically AS modify the signature of the constructor. makes sense. we should look at the p5 IO:: tree and

Re: use English

2005-04-28 Thread Graham Barr
On Apr 27, 2005, at 6:39 AM, Aaron Sherman wrote: On Tue, 2005-04-26 at 10:48, Luke Palmer wrote: Aaron Sherman writes: The reasons I don't use English in P5: * Variable access is slower Hmm, looks to me like $INPUT_RECORD_SEPARATOR is faster. (Actually they're the same: on each run a

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: L2R/R2L syntax

2003-01-21 Thread Graham Barr
On Mon, Jan 20, 2003 at 07:27:56PM -0700, Luke Palmer wrote: What benefit does C ~ bring to the language? Again, it provides not just a null operator between to calls, but rather a rewrite of method call syntax. So: map {...} ~ grep {...} ~ @boing; is not: map {...} grep {...}

Re: L2R/R2L syntax

2003-01-21 Thread Graham Barr
On Tue, Jan 21, 2003 at 09:20:04AM -0800, Michael Lazzaro wrote: On Tuesday, January 21, 2003, at 02:04 AM, Graham Barr wrote: If the function form of map/grep were to be removed, which has been suggested, and the ~ form maps to methods. How would you go about defining a utility

Re: L2R/R2L syntax

2003-01-17 Thread Graham Barr
On Fri, Jan 17, 2003 at 06:21:43PM +, Simon Cozens wrote: [EMAIL PROTECTED] (Mr. Nobody) writes: I have to wonder how many people actually like this syntax, and how many only say they do because it's Damian Conway who proposed it. And map/grep aren't specialized syntax, you could do the

Re: purge: opposite of grep

2002-12-06 Thread Graham Barr
On Fri, Dec 06, 2002 at 09:33:14AM -0500, Miko O'Sullivan wrote: For example, suppose I want to separate a list of people into people who have never donated money and those who have. Assuming that each person object has a donations property which is an array reference, I would want to

Re: [RFC] Perl6 HyperOperator List

2002-10-31 Thread Graham Barr
On Thu, Oct 31, 2002 at 12:16:34PM +, [EMAIL PROTECTED] wrote: Yesterday Aaron Crane wrote: Jonathan Scott Duff writes: @a `+ @b In my experience, many people actually don't get the backtick character at all. Yes. I think that might be a good reason _for_ using backtick

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Graham Barr
On Tue, Oct 29, 2002 at 05:16:48PM -0800, Michael Lazzaro wrote: unary (prefix) operators: \ - reference to * - list flattening ? - force to bool context ! - force to bool context, negate not - force to bool context, negate + - force to numeric

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Graham Barr
On Wed, Oct 30, 2002 at 01:25:44PM -0800, Austin Hastings wrote: --- Larry Wall [EMAIL PROTECTED] wrote: Do these French quotes come through? @a «+» @b Odd, I see them in this message. But In the message from Larry I see ?'s Graham.

Re: plaintive whine about 'for' syntax

2002-10-30 Thread Graham Barr
On Wed, Oct 30, 2002 at 01:57:00PM -0800, Dave Storrs wrote: *shrug* You may not like the aesthetics, but my point still stands: is rw is too long for something we're going to do fairly often. I am not so sure. If I look back through a lot of my code, there are more cases where I use

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Graham Barr
On Mon, Oct 28, 2002 at 03:30:54PM -0600, Jonathan Scott Duff wrote: On Mon, Oct 28, 2002 at 01:19:05PM -0800, Michael Lazzaro wrote: On Monday, October 28, 2002, at 01:09 PM, Larry Wall wrote: No. unless reads well in English. How do your read $a ! $b ! $c? nor? Maybe it's $a

Re: Private contracts?

2002-10-12 Thread Graham Barr
On Fri, Oct 11, 2002 at 05:50:55PM -0700, Larry Wall wrote: On Sat, 5 Oct 2002, Allison Randal wrote: : use Acme::N-1_0; # or whatever the format of the name is I don't see why it couldn't just be: use Acme::1.0; I agree thats better. But why not separate the version more by

Re: auto deserialization

2002-09-02 Thread Graham Barr
On Sat, Aug 31, 2002 at 01:52:18PM +, Damian Conway wrote: I'd suggest that redundancy in syntax is often a good thing and that there's nothing actually wrong with: my Date $date = Date.new('June 25, 2002'); I would say it is not always redundant to specify the type on both sides

Re: perl6-language@perl.org

2002-08-01 Thread Graham Barr
On Thu, Aug 01, 2002 at 06:02:14PM -0400, Miko O'Sullivan wrote: This is a small collection of ideas for the Perl6 language. Think of this posting as a light and refreshing summer fruit salad, composed of three ideas to while away the time during this August lull in perl6-language.

Re: [PRE-RELEASE] Release of 0.0.7 tomorrow evening

2002-07-22 Thread Graham Barr
On Mon, Jul 22, 2002 at 11:14:15AM +0100, Sam Vilain wrote: Sean O'Rourke [EMAIL PROTECTED] wrote: languages/perl6/README sort of hides it, but it does say that If you have Perl = 5.005_03, $a += 3 may fail to parse. I guess we can upgrade that to if you have 5.6, you lose. I notice

FIRST, BETWEEN, etc.. (was Re: Loop controls)

2002-05-07 Thread Graham Barr
I have been following this thread, but I would just like to inject a summary of the various related UPPERCASE blocks PREExecutes on block entry. Loop variables are in a known state POST Executes on block exit. Loop variables are in a known state NEXT Executes on

Re: FIRST, BETWEEN, etc.. (was Re: Loop controls)

2002-05-07 Thread Graham Barr
On Tue, May 07, 2002 at 12:27:08PM -0500, Allison Randal wrote: On Tue, May 07, 2002 at 03:15:48PM +0100, Graham Barr wrote: LAST Executes on implicit loop exit or call to last() Loop variables may be unknown Not exactly unknown. It's just that, in a few cases, their values may

Re: // in Perl 5.8?

2002-05-01 Thread Graham Barr
On Wed, May 01, 2002 at 12:17:52PM -0700, David Wheeler wrote: On 5/1/02 12:11 PM, Brent Dax [EMAIL PROTECTED] claimed: It's far too late to make it into 5.8, but it looks like it'll be in 5.10 when that comes out (in a year or two). I figured. Too bad. ;-) A year or two is long time to

Re: // in Perl 5.8?

2002-04-17 Thread Graham Barr
On Wed, Apr 17, 2002 at 01:09:43PM -0700, David Wheeler wrote: Anyone know what the chances are that some enterprising C hacker can/will/did get the // and //= operator into Perl 5.8? Seems like it wouldn't be a huge deal to add, and I'd love to have it sooner rather than later. It is not

Re: How to default? (was Unary dot)

2002-04-12 Thread Graham Barr
On Fri, Apr 12, 2002 at 09:26:45AM +0100, Piers Cawley wrote: Trey Harris [EMAIL PROTECTED] writes: I think I've missed something, even after poring over the archives for some hours looking for the answer. How does one write defaulting subroutines a la builtins like print() and chomp()?

Re: Unary dot

2002-04-10 Thread Graham Barr
On Wed, Apr 10, 2002 at 01:35:22PM -0400, Mark J. Reed wrote: On Wed, Apr 10, 2002 at 10:30:25AM -0700, Glenn Linderman wrote: method m1 { m2; # calls method m2 in the same class Yes, but does it call it as an instance method on the current invocant or as a class method with no

Re: Some Apocalypse 4 exception handling questions.

2002-01-23 Thread Graham Barr
On Wed, Jan 23, 2002 at 02:25:35PM -0800, Glenn Linderman wrote: I think you just said the same thing I did. To be more explicit, using the terminology you seem to want to use, I'll point out that I was only talking about the case of an inherited method, not a _replacement_ method. In other

Re: Apoc4: The loop keyword

2002-01-21 Thread Graham Barr
On Mon, Jan 21, 2002 at 12:50:38PM -0800, Larry Wall wrote: : What's the chance that it could be considered so? In most other languages, you wouldn't even have the opportunity to put a declaration into the conditional. You'd have to say something like: my $line = $in; if $line

Re: Apoc4: The loop keyword

2002-01-21 Thread Graham Barr
On Mon, Jan 21, 2002 at 03:58:49PM -0500, Michael G Schwern wrote: On Mon, Jan 21, 2002 at 03:43:07PM -0500, Damian Conway wrote: Casey wrote: So you're suggesting that we fake lexical scoping? That sounds more icky than sticking to true lexical scoping. A block dictates scope,

Re: Apoc4: The loop keyword

2002-01-21 Thread Graham Barr
On Mon, Jan 21, 2002 at 01:01:09PM -0800, Larry Wall wrote: Graham Barr writes: : But are we not at risk of introducing another form of : : my $x if 0; : : with : : if my $one = ONE { : ... : } : elsif my $two = TWO { : } : : if ($two

Re: Apoc4: The loop keyword

2002-01-21 Thread Graham Barr
On Mon, Jan 21, 2002 at 01:38:39PM -0800, Larry Wall wrote: Graham Barr writes: : On Mon, Jan 21, 2002 at 01:01:09PM -0800, Larry Wall wrote: : Graham Barr writes: : : But are we not at risk of introducing another form of : : : : my $x if 0; : : : : with : : : : if my

Re: [A-Z]+\s*\{

2002-01-20 Thread Graham Barr
On Sun, Jan 20, 2002 at 05:29:39AM -0800, Damian Conway wrote: On Saturday 19 January 2002 22:05, Brent Dax wrote: Is this list of special blocks complete and correct? Close and close. As of two days ago, Larry's thinking was: BEGIN Executes at the beginning of

Re: Apropos of nothing...

2001-12-13 Thread Graham Barr
On Fri, Dec 14, 2001 at 06:39:02AM +1100, Damian Conway wrote: In the following code fragment, what context is foo() in? @ary[0] = foo() Scalar context. @ary[0] is a single element of @ary. To call foo() in list context use any of the following: (@ary[0]) =

Re: flex perl mess

2001-10-24 Thread Graham Barr
On Wed, Oct 24, 2001 at 09:06:14AM -0400, Aaron Sherman wrote: On Tue, Oct 23, 2001 at 02:53:19PM +0200, Nadim Khemir wrote: Don't we already have that in Perl 5? if ( /\G\s+/gc ) {# whitespaces } elsif ( /\G[*/+-]/gc ) { # operator } elsif ( /\G\d+/gc ) {

Re: Per-object inheritance in core a red herring?

2001-07-02 Thread Graham Barr
On Fri, Jun 29, 2001 at 08:59:59AM -0400, John Porter wrote: Michael G Schwern wrote: Second, and perhaps more importantly, we can do this perfectly well with a module. No hacks, no tricks, no filters. Class::Object uses the mini-class technique (ie. auto-generated classes Sorry,

Re: Coupla Questions

2001-06-12 Thread Graham Barr
On Mon, Jun 11, 2001 at 10:39:51PM -0500, David L. Nicol wrote: Hopefully, we'll get a with operator and everything: with %database.$accountnumber { .interestearned += $interestrate * .balance } anything short of that, in my opinion, is merely trading old

Re: suggested properties of operator results

2001-06-11 Thread Graham Barr
On Mon, Jun 11, 2001 at 01:34:49AM -0700, Chris Hostetter wrote: For the record, bwarnock pointed out to me that damian allready proposed this behavior in RFC 25... http://dev.perl.org/rfc/25.html That RFC doesn't suggest having the comparison operators set properties on their

Re: Coupla Questions

2001-06-07 Thread Graham Barr
On Thu, Jun 07, 2001 at 08:15:46AM +0100, Simon Cozens wrote: On Wed, Jun 06, 2001 at 07:21:29PM -0500, David L. Nicol wrote: Damian Conway wrote: $ref.{a}can be $ref{a} which can also be $ref.a Dereferencing a hashref is the same as accessing a property?

Re: Coupla Questions

2001-06-06 Thread Graham Barr
On Thu, Jun 07, 2001 at 06:37:26AM +1000, Damian Conway wrote: So, to match $foo's colour against $bar, I'd say $bar =~ /$foo.colour/; No, you need the sub call parens as well: $bar =~ /$foo.colour()/; Hm, I thought Larry said you would need to use $() to

Re: Coupla Questions

2001-06-06 Thread Graham Barr
On Thu, Jun 07, 2001 at 07:43:55AM +1000, Damian Conway wrote: So, to match $foo's colour against $bar, I'd say $bar =~ /$foo.colour/; No, you need the sub call parens as well: $bar =~ /$foo.colour()/; Hm, I

Re: Coupla Questions

2001-06-06 Thread Graham Barr
On Thu, Jun 07, 2001 at 07:59:31AM +1000, Damian Conway wrote: But with the above you still have abiguity, for example what does this do $bar =~ /$foo.colour($xyz)/; Looks like a method call with parens, so *is* a method call with parens. I may be

Re: Coupla Questions

2001-06-06 Thread Graham Barr
On Wed, Jun 06, 2001 at 04:01:24PM -0700, Larry Wall wrote: [EMAIL PROTECTED] writes: : What should $foo = (1,2,3) do now? Should it be the same as what : $foo = [1,2,3]; did in Perl 6? (This is assuming that $foo=@INC does what : $foo = \@INC; does now.) Putting it another way:

Re: Coupla Questions

2001-06-06 Thread Graham Barr
On Thu, Jun 07, 2001 at 01:17:45AM +0100, Simon Cozens wrote: On Thu, Jun 07, 2001 at 12:24:50AM +0100, Graham Barr wrote: Can someone post a few ? I am open to what are the pros/cons but right now my mind is thinking Whats the benefit of making $a=(1,2,3); be the same as $a=[1,2,3

Re: properties

2001-05-22 Thread Graham Barr
On Tue, May 22, 2001 at 12:29:33PM +1000, Damian Conway wrote: if so, then wouldn't it be safer to put properties inside a special object associated with each object (the 'traits' object) so there would be little namespace collision? We actually want the possibility of that kind

Re: properties

2001-05-21 Thread Graham Barr
On Sun, May 20, 2001 at 01:24:29PM +0100, Simon Cozens wrote: On Sun, May 20, 2001 at 12:46:35AM -0500, Jonathan Scott Duff wrote: my $a is true = 0; # variable property my $a = 0 is true; # variable property my ($a) = 0 is true;# value

Re: properties

2001-05-21 Thread Graham Barr
On Sun, May 20, 2001 at 06:19:35PM -0400, Uri Guttman wrote: DC == Damian Conway [EMAIL PROTECTED] writes: DC return undef Because($borked); hmm, that is poor code as returning a real undef will break in a list context. I always balk when I see someone say that. This is

Re: 'is' and action at a distance

2001-05-19 Thread Graham Barr
On Fri, May 18, 2001 at 10:36:59PM -0400, John Siracusa wrote: print keys $foo.prop; # prints NumberHeard print values $foo.prop; # prints loneliestever This is an example of one of my concerns about namespace overlap with methods. What would happen if there was a method

Re: 'is' and action at a distance

2001-05-19 Thread Graham Barr
On Sat, May 19, 2001 at 06:41:29PM +1000, Damian Conway wrote: Graham wrote: On Fri, May 18, 2001 at 10:36:59PM -0400, John Siracusa wrote: print keys $foo.prop; # prints NumberHeard print values $foo.prop; # prints loneliestever This is an

Re: 'is' and action at a distance

2001-05-18 Thread Graham Barr
On Fri, May 18, 2001 at 03:01:38PM +1000, Damian Conway wrote: Also, what's the difference between a 'property' and an 'attribute', ie, are: $fh is true; and $fh.true(1); synonyms? No. The former means: Set the true

Re: 'is' and action at a distance

2001-05-18 Thread Graham Barr
On Fri, May 18, 2001 at 08:31:21AM -0500, Jarkko Hietaniemi wrote: On Fri, May 18, 2001 at 06:22:10AM -0700, Austin Hastings wrote: --- Damian Conway [EMAIL PROTECTED] wrote: It's probably just a matter of coding what you actually mean. In Perl 5 and 6 your version means if $fh

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 12:32:37PM -0500, Me wrote: an ordered hash is common Arrays too. not wise ... to alter features just for beginners. Agreed. (PS 11 people isn't a statistic, its a night at the pub) Your round... The extra complexity of a separate

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 01:56:01PM -0500, Me wrote: Hm, OK. What does this access and using what method ? $foo = '1.2'; @bar[$foo]; This is an argument against conflating @ and %. No it is not. It has nothing to do with using [] instead of {}. Yes it does. I was asking if the

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 03:23:56PM -0400, Buddha Buck wrote: At 08:10 PM 05-14-2001 +0100, Graham Barr wrote: On Mon, May 14, 2001 at 01:56:01PM -0500, Me wrote: Hm, OK. What does this access and using what method ? $foo = '1.2'; @bar[$foo]; This is an argument against

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 03:41:24PM -0400, John Porter wrote: Damian Conway wrote [and John Porter reformats]: @bar[$foo]; # Access element int($foo) of array @bar %bar{$foo}; # Access entry $foo of hash %bar @bar{$foo}; # Syntax error %bar[$foo]; # Syntax error And why is that

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 03:58:31PM -0400, John Porter wrote: Graham Barr wrote: As I said in another mail, consider $bar[$foo]; $bar{$foo}; But if @bar is known to be one kind of array or the other, where is the ambiguosity that that is meant to avoid? I did not say

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 02:51:08PM -0500, Me wrote: survey ? I never saw any survey, It was an informal finger-in-the-wind thing I sent to a perl beginners list. Nothing special, just a quick survey. http://www.self-reference.com/cgi-bin/perl6plurals.pl As someone else pointed out (I

Re: what I meant about hungarian notation

2001-05-09 Thread Graham Barr
On Wed, May 09, 2001 at 02:04:40PM -0400, John Porter wrote: Simon Cozens wrote: A scalar's a thing. Just as the index into a multiplicity is a thing. Yes, but as Larry pointed out. Knowing if the index is to be treated as a number or a string has some advantages for optimization Graham.

Re: Apoc2 - Context and variables

2001-05-07 Thread Graham Barr
On Mon, May 07, 2001 at 05:35:53PM -0400, John Porter wrote: Edward Peschko wrote: If %a = @b; does %c = map{ ($_ = undef ) } @a; Yep... particularly considering something neat like keys(%a) = @b; And what is wrong with @a{@b} = (); which I use all the time. But I

Re: Apoc2 - STDIN concerns

2001-05-05 Thread Graham Barr
On Fri, May 04, 2001 at 07:56:39PM -0700, Larry Wall wrote: Nathan Wiger writes: : : This one. I see a filehandle in *boolean* context meaning read to $_, : : just like the current while (FOO) magic we all know and occasionally : : love. I'd expect $FOO.readln (or something less Pascalish)

Re: Apoc2 - STDIN concerns

2001-05-05 Thread Graham Barr
On Sat, May 05, 2001 at 02:46:46AM +0100, Michael G Schwern wrote: On Fri, May 04, 2001 at 04:42:07PM -0700, Nathan Wiger wrote: I'm wondering what this will do? $thingy = $STDIN; This seems to have two possibilities: 1. Make a copy of $STDIN 2. Read a line from

Re: Please make last work in grep

2001-05-02 Thread Graham Barr
On Wed, May 02, 2001 at 11:10:22AM +0100, Michael G Schwern wrote: On Wed, May 02, 2001 at 11:13:13AM +0200, Alexander Farber (EED) wrote: I would like to propose adding the last statement to the grep, which currently doesn't work: For the record, I have no problem with this. :)

Re: Please make last work in grep

2001-05-02 Thread Graham Barr
On Wed, May 02, 2001 at 04:30:07PM +0100, Michael G Schwern wrote: On Wed, May 02, 2001 at 08:05:29AM -0700, Larry Wall wrote: Michael G Schwern writes: : (grep {...} @stuff)[0] will work, but its inelegant. It's inelegant only because the slice doesn't know how to tell the iterator

Re: Please make last work in grep

2001-05-02 Thread Graham Barr
On Wed, May 02, 2001 at 12:01:24PM -0400, Uri Guttman wrote: GB == Graham Barr [EMAIL PROTECTED] writes: GB On Wed, May 02, 2001 at 04:30:07PM +0100, Michael G Schwern wrote: On Wed, May 02, 2001 at 08:05:29AM -0700, Larry Wall wrote: Michael G Schwern writes: : (grep

Re: Please make last work in grep

2001-05-02 Thread Graham Barr
On Wed, May 02, 2001 at 06:29:51PM +0200, Bart Lateur wrote: On Wed, 2 May 2001 17:05:31 +0100, Graham Barr wrote: wantarray-ness is already passed along the call stack today. Thats the whole point of it. So what is the difference in passing a number instead of a boolean ? Because you

Re: a modest proposal Re: s/./~/g

2001-04-26 Thread Graham Barr
On Thu, Apr 26, 2001 at 03:35:24AM +, Fred Heutte wrote: Bart Lateur's response summarizes well what I've heard so far from responses both to the list and privately: (1) Yes, ~ *is* somewhat used in its current role as the bitwise negation (complement) operator. (2) No, that

Re: Strings vs Numbers (Re: Tying Overloading)

2001-04-25 Thread Graham Barr
On Wed, Apr 25, 2001 at 06:46:20PM +0100, Simon Cozens wrote: On Mon, Apr 23, 2001 at 12:59:54PM -0700, Nathan Wiger wrote: Doesn't ~ look like a piece of string to you? :-) It looks like a bitwise op to me, personally. That's because every time you've used it in Perl, it's been a

Re: a modest proposal Re: s/./~/g

2001-04-25 Thread Graham Barr
On Wed, Apr 25, 2001 at 06:19:40PM +, Fred Heutte wrote: It seems to me that ~ relates to forces (operators, functions and methods) more than to atoms (scalars), so to speak. It's the curve of binding Perl at work here. So why not leave . alone and have ~ substitute for -

Re: Strings vs Numbers (Re: Tying Overloading)

2001-04-24 Thread Graham Barr
On Mon, Apr 23, 2001 at 05:19:22PM -0700, Larry Wall wrote: At the moment I'm leaning toward ^ for concat, and ~ for xor. That I think that would lead to confusion too. In many languages ^ is xor and ~ is a bitwise invert. It is that way in perl now too, so perl is already quite standard in

Re: Tying Overloading

2001-04-23 Thread Graham Barr
On Mon, Apr 23, 2001 at 01:02:50PM +0100, Simon Cozens wrote: Or we change the concatenation operator. $a = $b $c; # Do people really use Perl for bit fiddling? Yes, all the time. $a = $b # $c; /* Urgh */ $a = $b ~ $c; # Mmm! I like that last one a lot, because it doesn't disturb

Re: Tying Overloading

2001-04-23 Thread Graham Barr
On Mon, Apr 23, 2001 at 02:31:55PM +0200, H.Merijn Brand wrote: On Mon, 23 Apr 2001 13:19:24 +0100, Graham Barr [EMAIL PROTECTED] wrote: $a = $b ~ $c; # Mmm! I like that last one a lot, because it doesn't disturb anything. You'd have to alter ~'s precedence so that binary

Re: Tying Overloading

2001-04-23 Thread Graham Barr
On Mon, Apr 23, 2001 at 12:36:47PM -0400, Dan Sugalski wrote: At 02:52 PM 4/23/2001 +0200, Davíð Helgason wrote: H.Merijn Brand wrote: $a = $b ~ $c; # Mmm! I like that last one a lot, because it doesn't disturb anything. You'd have to alter ~'s precedence so that binary ~

Re: Tying Overloading

2001-04-23 Thread Graham Barr
On Mon, Apr 23, 2001 at 11:40:50AM -0700, Larry Wall wrote: I do expect that @() and $() will be used for interpolating list and scalar expressions into strings, and it is probably the case the $() would be a synonym for scalar(). @() would then be a synonym for the mythical list() operator.

Re: s/./~/g

2001-04-23 Thread Graham Barr
On Mon, Apr 23, 2001 at 01:16:57PM -0700, Larry Wall wrote: Branden writes: : I'm starting to be a bit worried with what I'm reading... : : 1) Use $obj.method instead of $obj-method : : : The big question is: why fix what is not broken? Why introduce Javaisms and : VBisms to our pretty

Re: Tying Overloading

2001-04-23 Thread Graham Barr
On Mon, Apr 23, 2001 at 01:23:43PM -0600, Nathan Torkington wrote: Larry Wall writes: wanted, you still get the length. If you're worried about the delayed operation, you can force numeric context with $x = +@tmp;, just as you can force string context with a unary ~. How often are you

Re: Larry's Apocalypse 1

2001-04-06 Thread Graham Barr
On Thu, Apr 05, 2001 at 10:10:47PM +0100, Michael G Schwern wrote: Then it might be easier to write modules that are testable without a test driver. If you run the module directly, some distinguished block of code could be executed that wouldn't be if the module were "included" via

Re: Larry's Apocalypse 1

2001-04-06 Thread Graham Barr
On Fri, Apr 06, 2001 at 01:31:40PM +0200, Paul Johnson wrote: On Fri, Apr 06, 2001 at 10:01:47AM +0100, Graham Barr wrote: unless (defined wantarray) { # Self Test } This works because whenever a file is use'd, require'd etc. it is evaluated in a scalar context. The main file

Re: Larry's Apocalypse 1

2001-04-06 Thread Graham Barr
On Fri, Apr 06, 2001 at 03:52:47PM +0100, Simon Cozens wrote: On Fri, Apr 06, 2001 at 03:48:11PM +0100, Graham Barr wrote: Although Gisle's recent patch changes this for "do" at least. Hm, I did not see that. Can someone explain what the patch changed or give

Re: Schwartzian Transform

2001-03-28 Thread Graham Barr
On Wed, Mar 28, 2001 at 09:13:01AM -0500, Mark-Jason Dominus wrote: So you can say use Memoize; # ... memoize 'f'; @sorted = sort { my_compare(f($a),f($b)) } @unsorted to get a lot of the effect of the S word. Yes, and of course the inline version of this technique

Re: End-of-scope actions: Background.

2001-02-20 Thread Graham Barr
On Tue, Feb 20, 2001 at 03:49:13AM +, Simon Cozens wrote: On Mon, Feb 12, 2001 at 01:58:35PM -0700, Tony Olekshy wrote: Hi, it's me again, the guy who won't shut up about exception handling. I'm trying, I'm catching. And I'm thowing (up :) Graham.

Re: Autovivification behavior

2000-12-23 Thread Graham Barr
This has been discussed on p5p many many times. And many times I have agreed with what you wrote. However one thing you did not mention, but does need to be considered is func($x{1}{2}{3}) at this point you do not know if this is a read or write access as the sub could do $_[0] = 'fred'. If

Re: split() ideas

2000-09-28 Thread Graham Barr
On Thu, Sep 28, 2000 at 01:02:11PM -0500, Jonathan Scott Duff wrote: I thought I had sent this the other day, but it doesn't appear to have made it through... Here are a couple of ideas that I don't have time to RFC, but some who likes them might: 1. Allow the first argument to

Re: RFC 263 (v1) Add null() keyword and fundamental data type

2000-09-21 Thread Graham Barr
On Wed, Sep 20, 2000 at 10:08:09PM -0700, Glenn Linderman wrote: Russ Allbery wrote: Why on earth would you want to do this in real code? I wouldn't, of course. This is just a demonstration that I want both semantics available concurrently. If you are not going to use it, why implement

Re: RFC 263 (v1) Add null() keyword and fundamental data type

2000-09-20 Thread Graham Barr
On Tue, Sep 19, 2000 at 10:11:23PM -0700, Nathan Wiger wrote: undef null $a = undef; $a = null; $b = 1; $b = 1; $c = $a + b; $c = $a + $b; $c is 1

Re: RFC 263 (v1) Add null() keyword and fundamental data type

2000-09-20 Thread Graham Barr
On Wed, Sep 20, 2000 at 12:00:05AM -0700, Russ Allbery wrote: Perl already has exactly the data value that you're looking for. This RFC is proposing to fix the wrong problem; the things that need to be changed (conditionally) are the logical operators, not the data value. Absolutley,

Re: RFC 262 (v1) Index Attribute

2000-09-20 Thread Graham Barr
On Wed, Sep 20, 2000 at 08:05:20AM -0400, Webmaster wrote: David Nicol Wrote in RFC 262: foreach $item (@items){ #print "$item was at location ",$item:n,"\n"; print "$item was at location ${item:n}\n"; }; What would really be nice here is an Cindex function, similar to the scalar

Re: RFC 262 (v1) Index Attribute

2000-09-20 Thread Graham Barr
On Wed, Sep 20, 2000 at 09:03:39AM -0400, Webmaster wrote: Graham Barr Wrote: Well if there ever is a way to shortcut grep this could be genera;ized to my $index = grep { break if $_ eq $seek; 1 } @items; Wouldn't this also assume that grep return the number of times the block

Re: RFC 263 (v1) Add null() keyword and fundamental data type

2000-09-20 Thread Graham Barr
On Wed, Sep 20, 2000 at 10:00:56AM -0700, Damien Neil wrote: On Wed, Sep 20, 2000 at 04:12:09AM -, Perl6 RFC Librarian wrote: Add null() keyword and fundamental data type I think that this is better done as a special overloaded object used Incidentally, I'm surprised that DBI hasn't

Re: RFC 76 (v2) Builtin: reduce

2000-09-19 Thread Graham Barr
On Tue, Sep 19, 2000 at 07:29:56PM -, Perl6 RFC Librarian wrote: This RFC proposes a builtin Creduce function, modelled after Graham Barr's Creduce subroutine from builtin.pm Please refer to List::Util rather than builtin.pm the module name was changed as many did not like the name

Re: RFC 255 (v2) Fix iteration of nested hashes

2000-09-19 Thread Graham Barr
On Wed, Sep 20, 2000 at 07:06:21AM +1100, Damian Conway wrote: This RFC proposes that the internal cursor iterated by the Ceach function be stored in the pad of the block containing the Ceach, rather than being stored within the hash being iterated. Then how do you

Re: RFC 76 (v2) Builtin: reduce

2000-09-19 Thread Graham Barr
On Wed, Sep 20, 2000 at 08:35:20AM +1100, Damian Conway wrote: No other builtin dies like that at runtime. Perhaps a return of undef would be more like other operators. That was my original proposal, but it was howled down by the mathematical elite, who vigorously insisted that it

Re: RFC 76 (v2) Builtin: reduce

2000-09-19 Thread Graham Barr
On Tue, Sep 19, 2000 at 04:06:00PM -0600, Tom Christiansen wrote: Why not just check @numbers? Well if the 'use trisate' pragma ever arises (did anyone RFC that ?) $a = 1; $b = undef; $c = $a + $b; $c is undef, not 1. Graham.

Re: RFC 223 (v1) Objects: Cuse invocant pragma

2000-09-15 Thread Graham Barr
On Thu, Sep 14, 2000 at 08:10:54PM -, Perl6 RFC Librarian wrote: This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Objects: Cuse invocant pragma =head1 VERSION Maintainer: Damian Conway [EMAIL PROTECTED] Date: 14 September 2000

Re: Draft RFC: new pragma: Cuse namespace

2000-09-14 Thread Graham Barr
I would suggest that anyone want to contribute to this discussion should first read the thread about the addition of this pragma to perl5 in the perl5-porters archives http://www.xray.mpe.mpg.de/cgi-bin/w3glimpse/perl5-porters?query=use+namespace+pragmaerrors=0case=onmaxfiles=100maxlines=30

Re: $a in @b (RFC 199)

2000-09-12 Thread Graham Barr
On Mon, Sep 11, 2000 at 04:41:29PM -0500, Jarkko Hietaniemi wrote: Allow me to repeat: instead of trying to shoehorn (or piledrive) new semantics onto existing keywords/syntax, let's create something new. The blocks of grep/map/... are special. They are not quite looping blocks, they are not

Re: RFC 193 (v1) Objects : Core support for method delegation

2000-09-05 Thread Graham Barr
On Mon, Sep 04, 2000 at 09:53:39PM -, Perl6 RFC Librarian wrote: The proposed delegation mechanism would work via a pragma: use delegation attr1 = [qw( method1 method2 method3 )], attr2 = [qw( method4 method5 )], attr3 = [],

Re: Change ($one, $two)= behavior for optimization? (was Re: RFC 175 (v1) Add Clist keyword toforce list context (like Cscalar))

2000-09-05 Thread Graham Barr
On Tue, Sep 05, 2000 at 11:16:48AM +1100, Damian Conway wrote: By RFC 21, it looks like the call would be if ( want 'LIST' ) { $num_to_return = want; # do stuff } or, more efficiently: if ( ($num_to_return) = want 'LIST' ) {

Re: RFC 189 (v1) Objects : Hierarchical calls to initializersanddestructors

2000-09-04 Thread Graham Barr
On Mon, Sep 04, 2000 at 11:09:18AM +0100, Piers Cawley wrote: Damian Conway [EMAIL PROTECTED] writes: But I've gotta nitpick the name. I wonder if BLESS wouldn't be better? print calls PRINT, printf calls PRINTF, even if the subs don't do any printing. Sure makes it easier to

Re: RFC 175 (v1) Add Clist keyword to force list context (like Cscalar)

2000-09-01 Thread Graham Barr
On Fri, Sep 01, 2000 at 11:23:16AM -0700, Steve Fink wrote: I read your message and agree. Not that I liked the idea that much even before considering the ramifications. But do you agree that even seasoned perlers have trouble anticipating how a list/array is going to be converted to a

Re: Multiple for loop variables

2000-08-28 Thread Graham Barr
On Mon, Aug 28, 2000 at 04:10:01PM -0400, Eric Roode wrote: Peter Scott wrote: Graham Barr once allowed as how he thought it would be neat if you could say for my($x, $y, $z) (@list) { ... } ObLanguageMinimalist: Um. Is this so frequently-used that the above syntax is preferable

Re: error handling and syntax extension

2000-08-17 Thread Graham Barr
On Wed, Aug 16, 2000 at 04:49:15PM -0500, David L. Nicol wrote: or AUTOLOAD can be defined in terms of Ccatch and overloaded that way, rather than being its own kind of magic. catch "AUTOLOAD-$classname-$polymorphicsignature" {... But why should I have to know that a sub I want

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-16 Thread Graham Barr
On Tue, Aug 15, 2000 at 05:10:34PM -0400, Dan Sugalski wrote: Let's not move backwards and force people to work like machines. Instead, lets force machines to work like us. I dred to think what kind of machine we would make :) Graham.

  1   2   >