Re: I'll show you mine...

2002-04-10 Thread Piers Cawley
In message <[EMAIL PROTECTED]>, I wrote: > [ A huge wodge of possible perl 6 code ] I'm getting that Warnock's Dilemma feeling here... Did I stun you all into silence? -- Piers "It is a truth universally acknowledged that a language in possession of a rich syntax must be in need of a re

Re: I'll show you mine...

2002-04-10 Thread Piers Cawley
Aaron Sherman <[EMAIL PROTECTED]> writes: > On Wed, 2002-04-10 at 10:03, Piers Cawley wrote: >> In message <[EMAIL PROTECTED]>, I wrote: >> > [ A huge wodge of possible perl 6 code ] >> >> I'm getting that Warnock's Dilemma feeling here...

Re: I'll show you mine...

2002-04-10 Thread Piers Cawley
Melvin Smith <[EMAIL PROTECTED]> writes: > At 09:23 AM 4/10/2002 +0100, Piers Cawley wrote: >>Okay, this is the beginnings of Scheme in Perl6. I'm sure there's >>stuff I'm getting wrong. I've not written the parser yet for instance > > Very nice!

Re: Unary dot

2002-04-10 Thread Piers Cawley
Melvin Smith <[EMAIL PROTECTED]> writes: > At 10:50 AM 4/10/2002 -0700, Glenn Linderman wrote: >>"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

Re: Unary dot

2002-04-10 Thread Piers Cawley
Graham Barr <[EMAIL PROTECTED]> writes: > 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 t

Re: Unary dot

2002-04-10 Thread Piers Cawley
Glenn Linderman <[EMAIL PROTECTED]> writes: > Graham Barr wrote: >> >> 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 do

Re: none

2002-04-10 Thread Piers Cawley
Ashley Winters <[EMAIL PROTECTED]> writes: >> Patches welcome. > > Excellent... > > Forgive any formatting errors, I have mail issues. Thanks, applying. With a few caveats. > @@ -62,6 +62,7 @@ > class SchemePair is SchemeExpr { >my $nil //= class is SchemeExpr { > method is_nil {1} >

Re: Unary dot

2002-04-10 Thread Piers Cawley
"Mark J. Reed" <[EMAIL PROTECTED]> writes: > On Wed, Apr 10, 2002 at 07:57:01PM +0100, Piers Cawley wrote: >> > ::m2; # calls global subroutine main::m2 >> > main::m2; # calls global subroutine main::m2 >> >> This is looking more and more

Re: Unary dot

2002-04-10 Thread Piers Cawley
"David Whipp" <[EMAIL PROTECTED]> writes: > Piers Cawley >> > This may be a case of keep up at the back, but if that is a >> method call, >> > how do I call a subroutine from within a method ? >> >> [...] >> >> Yes, I know

Re: Unary dot

2002-04-10 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: [...] > Reflecting on this, it seems that it would be useful if methods > implicitly did their default topicalization-of-invocant like so: > > -> $self > > rather than just: > > -> $_ > > That is, that as well as aliasing the invocant to $_,

Re: Unary dot

2002-04-10 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: >> > $.foo >> >> It's already defined as an instance variable. > > I don't think I like that. Instance variables are far more common that > class variables, so why not just $foo, and you could use a compile-time > property for class variables. Lik

Re: Defaulting params

2002-04-10 Thread Piers Cawley
"Miko O'Sullivan" <[EMAIL PROTECTED]> writes: > The current plans indicate that a subroutine's params should be defaulted > like this: > >sub load_data ($filename ; $version / /= 1) {...} > > (The space between / and / is on purpose, my emailer has problems if > they are together.) If that's

Re: Defaulting params

2002-04-10 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > Piers wrote: > >> one could always handle the first case >> more explicitly by doing: >> >>sub load_data ($filename; $version) { >> $version = 1 if @_.length < 2; >> ... >>} > > Err...no. If you specify named parameters, you don't g

Re: Defaulting params

2002-04-11 Thread Piers Cawley
Aaron Sherman <[EMAIL PROTECTED]> writes: > On Thu, 2002-04-11 at 00:47, Damian Conway wrote: > >> sub load_data ($filename) { load_data($filename, 1) } >> >> sub load_data ($filename, $version) {...} > > Interesting. This brings goto to mind. Above, I could just assume > that inlining

Re: How to default? (was Unary dot)

2002-04-12 Thread Piers Cawley
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()? Assume the code: > > for <> { > printRec; > } > pri

Re: Fisher-Yates shuffle

2002-04-12 Thread Piers Cawley
[EMAIL PROTECTED] writes: > As for "cleanness", this is my interpretation of how perl6 is going > to work: > > %foo = (); > if %foo {"key"} {print "Hello 1"} > > %foo = (); > if %foo{"key"} {print "Hello 2"} > > %foo = (); > if %foo{"key"}{print "Hello 3"

Re: Fisher-Yates shuffle

2002-04-12 Thread Piers Cawley
[EMAIL PROTECTED] writes: > On Fri, Apr 12, 2002 at 04:00:37PM +0100, Piers Cawley wrote: >> >> [EMAIL PROTECTED] writes: >> > As for "cleanness", this is my interpretation of how perl6 is going >> > to work: >> > >>

Re: Fisher-Yates shuffle

2002-04-12 Thread Piers Cawley
[EMAIL PROTECTED] writes: > On Fri, Apr 12, 2002 at 04:42:07PM +0100, Piers Cawley wrote: >> [EMAIL PROTECTED] writes: >> > >> > Why isn't >> > >> > if %foo {"key"} {print "Hello 1"} >> > >> > equivalent

Re: Subroutine variables are like underwear

2002-04-15 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > Yes, subroutine variables *are* like underwear. > But parameter names *aren't* like underwear. > Because they're not (primarily) subroutine variables. > > So they're like the labels on the knobs, dials, and buttons of your > favourite elctronic device.

Re: Unary dot

2002-04-16 Thread Piers Cawley
Andy Wardley <[EMAIL PROTECTED]> writes: > On Mon, Apr 15, 2002 at 07:24:13PM -0700, Larry Wall wrote: >> So the main reason that objects can function as hashes is so that the >> user can poke an object into an interface expecting a hash and have it >> "make sense", to the extent that the object i

Scary things

2002-04-16 Thread Piers Cawley
Also known as constructs you wish you hadn't discovered. So, I'm reading through Finkel and I came across the following, which computes the greatest common divisor of a and b (recast into perl6ish syntax) while { when $a < $b { $b -= $a } when $b < $a { $a -= $b } } The idea is that

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Piers Cawley
Aaron Sherman <[EMAIL PROTECTED]> writes: > On Tue, 2002-04-16 at 14:00, Mike Lambert wrote: >> Speaking of which, how do we ensure the immutability of keys being put >> into the hash? I think Perl copied the string, so that: >> >> $b = "aa"; >> $a{$b} = 1; >> chop $b; >> print $a{"aa"}; >> >>

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Piers Cawley
David Wheeler <[EMAIL PROTECTED]> writes: > On 4/16/02 11:57 AM, "Piers Cawley" <[EMAIL PROTECTED]> claimed: > >> Personally I'd like the default hash to return some immutable, unique >> and probably opaque object id (something the like >> 

Re: Regex and Matched Delimiters

2002-04-23 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > /^pat$/m /^^pat$$/ $$ is no longer the current PID? Or will we have to call that '${$}' in a regex? -- Piers "It is a truth universally acknowledged that a language in possession of a rich syntax must be in need of a rewrite."

Re: Regex and Matched Delimiters

2002-04-23 Thread Piers Cawley
"Brent Dax" <[EMAIL PROTECTED]> writes: > Larry Wall: > That's...odd. Is $$ (the variable) going away? > > # /./s// or /<.>/ ??? > > I think that . is too common a metacharacter to be relegated to > this. I think you failed to notice that '/s' on the regex. In general . w

Re: Loop controls

2002-05-01 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: > On Tue, 30 Apr 2002, Miko O'Sullivan wrote: > >> > Damian, now having terrible visions of someone suggesting C ;-) >> >> Then may I also give you nightmares on: elsdo, elsdont, elsgrep, elstry ... > > Ooh! Why don't we have a dont command! With several

What does this do?

2002-05-03 Thread Piers Cawley
Consider the following. sub foo {...} foo *@ary; foo * @ary; Is this another place where whitespace will have meaning? Or should I add parentheses to disambiguate? Enquiring minds want to know. -- Piers "It is a truth universally acknowledged that a language in possession of

Re: What does this do?

2002-05-07 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > Piers Cawley writes: > : Consider the following. > : > :sub foo {...} > : > :foo *@ary; > :foo * @ary; > : > : Is this another place where whitespace will have meaning? Or should I > : add parentheses t

Re: Accessor methods ?

2002-05-10 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > Aaron Sherman wrote: > >> > What if I want my methods to be called C<.get_bar()> and C<.set_bar()>, >> > since a certain Perl OO specialist suggests this approach is best for >> > avoiding ambiguity in one's API? >> >> Then you can declare them as such

Re: Loop controls

2002-05-10 Thread Piers Cawley
"Miko O'Sullivan" <[EMAIL PROTECTED]> writes: > From: "Damian Conway" <[EMAIL PROTECTED]> >> while (my $res = $search->getnext) { ...} >> >> has a valid meaning in Perl 6. In fact, it's meaning in Perl 6 is far more >> reasonable than in Perl 5. > > I don't think the new meaning makes sense at al

Re: Idea

2002-05-24 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: >> >The rest of this message assumes that the answer to A is "run time error". >> >> I'm not sure that's correct. Might just be a runtime warning, > > I would assume not. How can we optimize if we just make it a > warning? By only optimizing in the prese

Re: A5: a few simple questions

2002-06-06 Thread Piers Cawley
Allison Randal <[EMAIL PROTECTED]> writes: > On Thu, Jun 06, 2002 at 10:38:39AM -0400, John Siracusa wrote: >> On 6/6/02 2:43 AM, Damian Conway wrote: >> > rule wordlist { (\w+) [ , (\w+) ]* } >> >> No semicolon at the end of that line? I've already forgotten the "new >> rules" for that type

Re: perl6 requirements

2000-08-01 Thread Piers Cawley
Edwin Steiner <[EMAIL PROTECTED]> writes: > In my opinion Perl lacks (at least partially) some features which > I consider important for scripting languages: > > * elimination of pointers (If I want to spend my time considering how > many dereference operators to use I'll go for ***C++). > I'm aw

Re: perl 6 requirements

2000-08-01 Thread Piers Cawley
Chaim Frenkel <[EMAIL PROTECTED]> writes: > > "TA" == Ted Ashton <[EMAIL PROTECTED]> writes: > > TA> In general, they do what you want, unless you want consistency. > > Randal, Tom, et. al. > > How locked in to your brain is this lack of consistency? How un-perlish > would it be to clean

Re: Random items (old p5p issues)

2000-08-01 Thread Piers Cawley
Chaim Frenkel <[EMAIL PROTECTED]> writes: > Magic words. > > Iterators Doable in perl5 already. > Reduce (e.g. $x = reduce { sum } @list; Doable in perl5 > Case/Switch Why? And Damian's already proved it can be done. -- Piers

Re: perl 6 requirements

2000-08-01 Thread Piers Cawley
Chaim Frenkel <[EMAIL PROTECTED]> writes: > > "CF" == Chaim Frenkel <[EMAIL PROTECTED]> writes: > > > "TA" == Ted Ashton <[EMAIL PROTECTED]> writes: > TA> In general, they do what you want, unless you want consistency. > > CF> Randal, Tom, et. al. > > CF> How locked in to your brain is

Re: Random items (old p5p issues)

2000-08-01 Thread Piers Cawley
Chaim Frenkel <[EMAIL PROTECTED]> writes: > And how about > > continuations, generators and co-routines. Now those'd be nice if they could be added without slowing down the rest of perl. -- Piers

Re: What is Perl?

2000-08-02 Thread Piers Cawley
Nathan Torkington <[EMAIL PROTECTED]> writes: > Alan Burlison writes: > > > The ability to have strong-typing (I don't trust Junior Engineers to get it > > > right and I don't have time to check every line of code they write) > > > > No. No no no no. This approach is fundamentally wrong. > > (

Re: type-checking [Was: What is Perl?]

2000-08-02 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > Peter Scott <[EMAIL PROTECTED]> (I think -- Piers) writes: >> Though a good post condition would benefit from some sort of >> unconditional catch of return, I suppose. Perhaps allowing >> continue on the outer sub block... > > Argh, no! A g

Re: Typeglobs, filehandles, asterisks

2000-08-02 Thread Piers Cawley
Tom Christiansen <[EMAIL PROTECTED]> writes: > >Typeglobs != symbol tables. > > >You can access individual variable bits in the symbol table now without > >using typeglobs. I don't see why that would have to change. > > NB: $main::{fred} does not autoviv a typeglob when used lvaluably, > but

Re: perl 6 requirements

2000-08-02 Thread Piers Cawley
Chaim Frenkel <[EMAIL PROTECTED]> writes: > >>>>> "PC" == Piers Cawley <[EMAIL PROTECTED]> writes: > > >> How locked in to your brain is this lack of consistency? How un-perlish > >> would it be to cleanup, crypto-context, or the mean

Re: Removing/fixing $[line noise here] variables

2000-08-02 Thread Piers Cawley
Steve Simmons <[EMAIL PROTECTED]> writes: > For deprecation, we should have a %PERL_DEPRECATED{mod}{thing} hash as > well. `mod' is `CORE', `FORMATS', etc, as above. A value of 0 means the > function is actually gone, 1 means it's disappearing next major release, > 2 mean next minor, etc. The p

Re: RFC: Request For New Pragma: Implicit

2000-08-02 Thread Piers Cawley
Jonathan Scott Duff <[EMAIL PROTECTED]> writes: > On Tue, Aug 01, 2000 at 08:54:27PM -0400, Bryan C.Warnock wrote: > > There should be an C pragma that gives new life and meaning to > > void context constructs. In my case, I want it to print to the default > > filehandle, (which is also implicit

perl6-language@perl.org

2000-08-02 Thread Piers Cawley
dLux <[EMAIL PROTECTED]> writes: > Hello! > > I want to make do a nested hash structure, which seems like that: > > my $pname = $self->{db}->{product}->offers->{ $product_id} -> > {name}; > > This kind of structures can be easily created by TableMap. > > Problem: If any of the has

Refactoring browsers

2000-08-02 Thread Piers Cawley
So, I've been reading about the Smalltalk Refactoring Browser http://st-www.cs.uiuc.edu/users/brant/Refactory/RefactoringBrowser.html and found myself repeatedly thinking. "Wow, that's cool, I want one of these for Perl". Now, it's probably possible to build one of these for perl, though I have t

Re: RFC: lexical variables made default

2000-08-04 Thread Piers Cawley
Tom Christiansen <[EMAIL PROTECTED]> writes: > >[EMAIL PROTECTED] wrote: > >> Perl's similarity to English is one of the things that makes it Fun. > > >OTOH, being fun (which I admit it is) is one of the reasons many > >people don't want to think Perl is a serious language. > > So what? Well s

Re: RFC: lexical variables made default

2000-08-04 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: >> > Perl's similarity to English is one of the things that makes it Fun. >> >> OTOH, being fun (which I admit it is) is one of the reasons many >> people don't want to think Perl is a serious language. >> >> Not saying we should

Re: wanthash (Was: Re: date interface (was Re: perl6 requirements, on bootstrap))

2000-08-04 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: >> > It was Damian's, no? >> >> I bet he has a paper on it. > > http://www.csse.monash.edu.au/~damian/Perl/want.proposal Ooh, I like that. I'm already frustrated with the current lvalue setup, this would be a big improvement. Actually, I'd

Re: RFC: Highlander Variables

2000-08-04 Thread Piers Cawley
Graham Barr <[EMAIL PROTECTED]> writes: > On Wed, Aug 02, 2000 at 06:15:48PM +0200, H.Merijn Brand wrote: > > If I could, I would VETO! > > > > This would break about 90% of my scripts. I use the same name for different > > type of variables to group them: > > Why ? Remember there will (hopeful

Re: perl 6 requirements

2000-08-04 Thread Piers Cawley
Tom Christiansen <[EMAIL PROTECTED]> writes: > >True, but maybe a lower precedance keword is needed like we did > >or || and &&. I think someone suggested "then" > > > print $string1, $string2, "\n" then return 3 if $cond; > > >then again, maybe not. > > Why not just piss everybody off? > >

Re: Contexts [was:Reduce[Re:]]

2000-08-04 Thread Piers Cawley
"raptor" <[EMAIL PROTECTED]> writes: > > ...and have some_func know it is being called in an iterator context > > and be able to create it's own iterator. foldr could then be > > done as... > > I think may have not only list,scalar,iterator context. But some way to > define CONTEXT itself,

Re: RFC: Filehandle type-defining punctuation

2000-08-04 Thread Piers Cawley
Tom Christiansen <[EMAIL PROTECTED]> writes: > >But that, precisely, was my point: Arrays *and* hashes. If there is more than > >one plural whatzitz, then why can't there be more than one singular whatzitz? > >(and don't say, "because plural *means* more than one" :-). If having a > >filehandl

Re: RFC stuff

2000-08-04 Thread Piers Cawley
Nathan Torkington <[EMAIL PROTECTED]> writes: > Tom Christiansen writes: > > What is the purpose of ghettoizing everying cohering topic? Making > > us subscribe to infinite lists to wear us down? > > Yes. > > If you really care about the topic, you'll join the list. If you > don't care, stay

Re: Where must you 'no strict'?

2000-08-04 Thread Piers Cawley
Peter Scott <[EMAIL PROTECTED]> writes: > Glad to see the tide of sentiment towards making strictness the default > :-) To feed my personal fetish for optional site policies prohibiting > disabling certain strictness, can anyone enumerate circumstances when you > *cannot* currently achieve so

Re: named parameters

2000-08-04 Thread Piers Cawley
Ken Fox <[EMAIL PROTECTED]> writes: > Nathan Wiger wrote: > > Because it has opportunity for bloat, I would suggest it should be in a > > pragma: > > > >use strict 'prototypes'; > > Bloat? What bloat? I don't want to *bloat* all my programs by sticking > a zillion pragmas in just to turn on

Re: proto-rfc. Elements of @_ should be read-only.

2000-08-04 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > Indirect calls might not be a problem, depending on how much flow analysis > we can do in the optimizer. While that won't be much in the > on-the-fly-compile version (a 10s runtime with a 50s compile time's not a > good thing...) I'm hoping the optimiz

Re: Life without eval

2000-08-04 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 02:31 PM 8/4/00 +0200, dLux wrote: > > My suggestion is: declare "eval $scalar" as a bad guy. > > It's not just string eval. It's also do FILE and require. > > It's a powerful construct, though, and I wouldn't declare it as evil. > Possibly as "u

Re: RFC 28 (v1) Perl should stay Perl.

2000-08-04 Thread Piers Cawley
Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: > Maintainer: Simon Cozens <[EMAIL PROTECTED]> > > =item Object Orientation > > Some things just don't need heavy object orientation. B things > don't need heavy object orientation, and it's not Perlthink to force > programmers into onerous r

Re: Deep copy

2000-08-07 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 05:31 AM 8/7/00 +1000, Damian Conway wrote: > >> >Another one for my wish list: deep copying support built in. A devil > >> >inside me thinks this should be a new assignment > >> >operator. Damian? Sounds like this is up your alley. I

Re: RFC 53 (v10) Built-ins: Merge and generalize C

2000-08-07 Thread Piers Cawley
Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: > =head1 DESCRIPTION > > At present C only returns the index of the first occurrence of a > specified substring. It is proposed that C take a fourth parameter > telling it which occurrence of a specified substring to locate: > > $first = in

Re: RFC: Rename local() operator

2000-08-07 Thread Piers Cawley
Nathan Wiger <[EMAIL PROTECTED]> writes: > > > But it isn't "here" that's the problem. If we just wanted to change > > > the value "here", we could use my(). The problem is that local() > > > changes the value for somewhere else as well as here. > > > > Well, as has been pointed out, special^W

Re: RFC 55 (v1) Compilation: Remove requirement for fina

2000-08-07 Thread Piers Cawley
Nathan Torkington <[EMAIL PROTECTED]> writes: > John Porter writes: > >> Compilation: Remove requirement for final true value in require'd and > >> do'ed files > > > > Do not. I use this feature. > > Is there any reason you couldn't use "die" instead? Is there any reason that both couldn't be

Re: RFC 59 (v1) Proposal to utilize C<*> as the prefix t

2000-08-08 Thread Piers Cawley
Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: > This and other RFCs are available on the web at > http://dev.perl.org/rfc/ > > =head1 TITLE > > Proposal to utilize C<*> as the prefix to magic subroutines I freely accept that this is not anything approaching a reasoned critique but: Yecch!

Re: RFC 59 (v1) Proposal to utilize C<*> as the prefix t

2000-08-08 Thread Piers Cawley
Peter Scott <[EMAIL PROTECTED]> writes: > At 12:07 AM 8/8/00 +0200, Bart Lateur wrote: > >On Mon, 07 Aug 2000 10:56:40 -0700, Peter Scott wrote: > > > > >I meant that BEGIN, END, and INIT aren't declared as subs at present but > > >named blocks. I was surprised to discover that they're put in th

Re: wildcard includes

2000-08-08 Thread Piers Cawley
"Peter Bevan" <[EMAIL PROTECTED]> writes: > Just a thought, but I think it woul be a good idea to include the > 'java-esqe' practice of including packages via foo.barr.* > or in Perl's case Foo::Bar::* (assume that the module include syntax remains > the same)... > > I can see that in the case o

Re: Things to remove

2000-08-08 Thread Piers Cawley
Leon Brocard <[EMAIL PROTECTED]> writes: > Martyn J. Pearce sent the following bits through the ether: > > > I use this in one-liners, and it's _dead_ handy > > May I suggest that Perl6 will be a different language? I've seen the > "I use it, don't change it" argument a couple of times now and

Re: Stuff in core (was Re: date interface, on language (was Re: perl6 requirements, on bootstrap))

2000-08-02 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > From a language perspective, I have a scheme to allow us to yank all the > cruft (sockets, shm, messages, localtime...) out into separate libraries, > yet pull them in on demand without needing a use. a la dbmopen in perl5? -- Piers

Re: RFC 59 (v1) Proposal to utilize C<*> as the prefix t

2000-08-09 Thread Piers Cawley
Peter Scott <[EMAIL PROTECTED]> writes: > At 09:28 AM 8/8/00 +0100, Piers Cawley wrote: > >Peter Scott <[EMAIL PROTECTED]> writes: > > > > > At 12:07 AM 8/8/00 +0200, Bart Lateur wrote: > > > >On Mon, 07 Aug 2000 10:56:40 -0700, Peter Scott wrot

Re: access to pod/doc text by code

2000-08-09 Thread Piers Cawley
Uri Guttman <[EMAIL PROTECTED]> writes: > some people have mentioned help strings as special parts of a sub > declaration like gnu lisp has. this could be more support for that type > of thing. but i don't want it to be too strange. Hmm... sub foo ($$;@) :lvalue "Documentation string h

Re: RFC 23 (v2) Higher order functions

2000-08-09 Thread Piers Cawley
Peter Scott <[EMAIL PROTECTED]> writes: > >=head1 TITLE > > > >Higher order functions > > Well, this should keep the Obfuscated Perl Contest going for at least > another decade :-) Whilst still being deeply useful in non obfuscatory contexts too. -- Piers

Re: RFC 48 (v2) Objects should have builtin stringifying

2000-08-10 Thread Piers Cawley
John Porter <[EMAIL PROTECTED]> writes: > Michael Fowler wrote: > > > > I think a stringified reference is worth seeing, moreso than a simple undef, > > for debugging purposes if nothing else. > > I personally would like to have the stringification of refs be a > symmetric operation, i.e. such

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-11 Thread Piers Cawley
Chaim Frenkel <[EMAIL PROTECTED]> writes: > One thing that isn't addressed in any of the exception RFC's (and it > may not be appropriate) is how to actually use it. Not in the syntactical > or semantic meaning. But in how to use it practically. > > Given six lines of code within a trapping cont

Re: RFC 8 (v2) The AUTOLOAD subroutine should be able t

2000-08-11 Thread Piers Cawley
Graham Barr <[EMAIL PROTECTED]> writes: > Damian Conway <[EMAIL PROTECTED]> writes: > >Leon Brocard writes: > >> =head2 $AUTOLOAD > >> > >> While we're at it, it *may* be a good idea to remove the > >> global $AUTOLOAD variable and instead pass it as the first > >> paramet

Re: RFC 84 (v1) Replace => (stringifying comma) with =>

2000-08-11 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: >> Are the two values of a pair restricted in anyway? All your examples >> were scalar. > > Yes. The two components must be scalars. > The key is stringified iff it's a bareword. > Otherwise no restrictions. So assuming pairs are scalars...

Re: the currying operator

2000-08-11 Thread Piers Cawley
Graham Barr <[EMAIL PROTECTED]> writes: > On Fri, Aug 11, 2000 at 02:52:32AM -0700, Nathan Wiger wrote: > > Mike- > > > > Jeremy's got a great explanation of this, which I'll paraphrase, but the > > discussion went through lots of iterations. Think of the ^ as a carat or > > thumbtack, holding t

Re: the currying operator

2000-08-11 Thread Piers Cawley
Graham Barr <[EMAIL PROTECTED]> writes: > On Fri, Aug 11, 2000 at 01:47:12PM +0100, Piers Cawley wrote: > > > /^_/ > > > > > > What is that matching ? > > > > We've done this. It's matching a string that begins with '_'. W

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-11 Thread Piers Cawley
John Porter <[EMAIL PROTECTED]> writes: > Piers Cawley wrote: > > > > The (continue|always|finally|whatever) clause will *always* be > > executed, even if one of the catch clauses does a die, so you can use > > this to roll back the database transaction or w

Re: RFC 76 (v1) Builtin: reduce

2000-08-11 Thread Piers Cawley
John Porter <[EMAIL PROTECTED]> writes: > > Simpler semantics and you can always ref a L(OL(OL(OL...etc.))) if you need > > multidimensionals. > > Combined with highlander variables, and there ceases to be a problem. Will you stop with the highlander variables? -- Piers

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-11 Thread Piers Cawley
Chaim Frenkel <[EMAIL PROTECTED]> writes: > >>>>> "PC" == Piers Cawley <[EMAIL PROTECTED]> writes: > > PC> The (continue|always|finally|whatever) clause will *always* be > PC> executed, even if one of the catch clauses does a die, so you c

Re: RFC 76 (v1) Builtin: reduce

2000-08-16 Thread Piers Cawley
Nathan Wiger <[EMAIL PROTECTED]> writes: > Jarkko Hietaniemi wrote: > > > > The $a and $b of the sort comparator were A Bad Idea to begin with. > > Ditto. Can we ditch these in Perl 6? Don't see why $_[0] and $_[1] can't > be used, or even a more standard $1 and $2. Either one makes it more > ob

Re: Make lvalue subs the default (was Re: RFC 107 (v1) lvalue subs should receive the rvalue as an argument)

2000-08-16 Thread Piers Cawley
Nathan Wiger <[EMAIL PROTECTED]> writes: > Nathan Torkington wrote: > > Not every subroutine corresponds to a method call exposing > > object-internal data. Most of my subroutines *do* something and make > > no sense to be called lvaluably. Explicit marking the compiler pick > > up assignments t

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

2000-08-16 Thread Piers Cawley
"J. David Blackstone" <[EMAIL PROTECTED]> writes: > I find the standard prefix symbols so intuitive I find it hard to > articulate the reasons why I balk at giving them up. It's like > explaining breathing or the ability to distinguish colors. Bravo! What he said! Hear, hear! [FX: Waves order

Re: English language basis for "throw"

2000-08-16 Thread Piers Cawley
[EMAIL PROTECTED] writes: > Please take this discussion to the new -errors sublist. Thanks in > advance! Exceptions are not necessarily errors. This belongs in perl-language-flow surely? -- Piers

Re: RFC 107 (v1) lvalue subs should receive the rvalue as an argument

2000-08-16 Thread Piers Cawley
Jonathan Scott Duff <[EMAIL PROTECTED]> writes: > On Wed, Aug 16, 2000 at 10:59:38AM +0100, Piers Cawley wrote: > > Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: > > > This RFC proposes that lvalue subs, when invoked as such, should receive > > > the rva

Re: RFC 107 (v1) lvalue subs should receive the rvalue as an argument

2000-08-16 Thread Piers Cawley
Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: > This RFC proposes that lvalue subs, when invoked as such, should receive > the rvalue being assigned to it as an argument. I'm kind of in two minds about this. Most of the time the current lvalue behaviour does pretty much the Right Thing, and sim

Re: RFC 126 (v1) Ensuring Perl's object-oriented future

2000-08-18 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > I'd like to say that I whole-heartedly endorse the sentiments expressed in > this RFC (and *not* just because it likes my book! ;-) Well, it is a very good book... > Well done, John. Seconded. -- Piers

Re: ... as a term

2000-08-22 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > If you're into dwimmery, you could make all of these work, too: > > print (1, 2, 4, ...) > print (1, 4, 9, 16, 25, ...) > print (1, 1, 2, 3, 5, ...) > print ('a', 'b', 'c', ...) > print (3, 1, 4, 1, 5, 9, 6, 2, 5, ...) You forgot:

Re: RFC 147 (v2) Split Scalars and Objects/References into Two Types

2000-08-29 Thread Piers Cawley
Nathan Wigner, disguised as Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: [...] Gut feeling, I don't like this proposal. Examples coming up. > Increases in namespace are basically always beneficial. > > =head2 Potential Problems > > This approach is not without its problems. These need to b

Re: RFC 126 (v2) Ensuring Perl's object-oriented future

2000-08-29 Thread Piers Cawley
Tom Christiansen <[EMAIL PROTECTED]> writes: > >Object-oriented features were added to Perl with version 5, and in many > >ways still appear somewhat "tacked on", with perhaps undue respect > >for the Old Ways of Perl 4. > > [NB: This is not a serious missive.] > > Hey, that Perl uses package

Re: RFC 167 (v2) Simplify C Syntax

2000-08-30 Thread Piers Cawley
Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: > =head1 DESCRIPTION > > One of the most common mistakes I make is forgetting a C<;> after > C, probably because I'm thinking ``if'' and an if doesn't > require a C<:> after it's closing C<}>. I'll type, for example, > > $cond and do { >

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-08-30 Thread Piers Cawley
Tom Christiansen <[EMAIL PROTECTED]> writes: > >This and other RFCs are available on the web at > > http://dev.perl.org/rfc/ > > >=head1 TITLE > > >Eliminate bareword filehandles. > > "Eliminate" is such a strong word. You're saying that we can't > use STDIN, STDOUT, STDERR, ARGV, or DATA an

Re: RFC 168 (v1) Built-in functions should be functions

2000-08-30 Thread Piers Cawley
Tom Christiansen <[EMAIL PROTECTED]> writes: > >I intend to extend the parameter lists RFC to cover optional > >(non-tailing) arguments. > > Will this include having typed variadic functions, allowing you, for > example, to say something like > > This function takes any number of arrays, a

Re: RFC 168 (v1) Built-in functions should be functions

2000-09-01 Thread Piers Cawley
Tom Christiansen <[EMAIL PROTECTED]> writes: > >Doesn't that tend to lead us in the direction of pack madness where we > >end up with yet another 'sub language' within perl. We've already got > >pack specifiers and regexen and the 'old' prototyping stuff. I'm not > >arguing *against* these things

Re: Fwd: RE: $a in @b

2000-09-06 Thread Piers Cawley
Tom Christiansen <[EMAIL PROTECTED]> writes: > >IMHO Perl should add a plethora of higher-order functions for arrays and > >hashes, and from the chatter here I think a lot of people agree. > > Make some modules, release them, and see how much they're used. Then > one can contemplate sucking

Re: RFC 84 (v1) Replace => (stringifying comma) with =>

2000-08-11 Thread Piers Cawley
Piers Cawley <[EMAIL PROTECTED]> writes: > Damian Conway <[EMAIL PROTECTED]> writes: > > >> Are the two values of a pair restricted in anyway? All your examples > >> were scalar. > > > > Yes. The two components must be scalars

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-12 Thread Piers Cawley
Tom Christiansen <[EMAIL PROTECTED]> writes: > >I don't want a set representation. I want set operations. And somehow > >for this having to add a use statment and who knows what overhead for > >what seems to be a simple operation is a pain. > > The overhead is not that it should be a module, but

Re: RFC 223 (v1) Objects: C pragma

2000-09-18 Thread Piers Cawley
Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: > This and other RFCs are available on the web at > http://dev.perl.org/rfc/ > > =head1 TITLE > > Objects: C pragma > > =head1 VERSION > > Maintainer: Damian Conway <[EMAIL PROTECTED]> > Date: 14 September 2000 > Mailing List: [EMAIL PRO

Re: IDEA: my() extensions and attribute declarations

2000-09-21 Thread Piers Cawley
Nathan Wiger <[EMAIL PROTECTED]> writes: > It seems potentially useful to be able to say: > >my Dog, Cat $fluffy; > > As a way to say "$fluffy can be either a Dog or a Cat". Since variables > are prefixed, anything comma-separated up to the variable is an > alternate class for that variable:

Re: perl6storm #0050

2000-09-27 Thread Piers Cawley
Robert Mathews <[EMAIL PROTECTED]> writes: > Simon Cozens wrote: > > (defun Schwartzian (func list) > > (mapcar > >(lambda (x) (car x)) > >(sort > > (mapcar > > (lambda (x) (cons x (funcall func x))) > > list > > ) > > (lambda (x y) (< (cdr x) (cdr y))) > > )

Re: perl6storm #0050

2000-09-27 Thread Piers Cawley
Simon Cozens <[EMAIL PROTECTED]> writes: > Readability is a programmer feature, not a language feature. The most important optimization a programmer can make is to optimize for understanding. -- Piers

  1   2   3   >