Re: What's up with %MY?

2001-09-03 Thread Ken Fox
Damian Conway wrote: > It would seem *very* odd to allow every symbol table *except* > %MY:: to be accessed at run-time. Well, yeah, that's true. How about we make it really simple and don't allow any modifications at run-time to any symbol table? Somehow I get the feeling that "*very* odd" can'

Re: What's up with %MY?

2001-09-03 Thread Damian Conway
Dan revealed: > > How am I expected to produce fresh wonders if you won't let me > > warp the (new) laws of the Perl universe to my needs? > That's easy--you slip the pumpking or internals designer a 10-spot. > Amazing what it'll do... :) And how do you think I got five of my module

Re: What's up with %MY?

2001-09-03 Thread Dan Sugalski
At 04:11 PM 9/4/2001 +1100, Damian Conway wrote: >I would envisage that mucking about with symbol tables would be no more >common in Perl 6 than it is in Perl 5. But I certainly wouldn't want to >restrict the ability to do so. > >How am I expected to produce fresh wonders if you won't let me warp

Re: What's up with %MY?

2001-09-03 Thread Damian Conway
> I haven't seen details in an Apocalypse, but Damian's > Perl 6 overview has a bit about it. The Apocalypse > specifically mentions *compile-time* scope management, > but Damian is, uh, Damian. (DWIMery obviously. ;) Hmm. It would seem *very* odd to allow every symbol table *ex

Re: Prototypes

2001-09-03 Thread Damian Conway
> > Are prototypes going to be checked at runtime now? > > For methods, at least. Dunno about subs, that's Larry's call. I > could make a good language case for and against it. It adds > overhead on sub calls, which is a bad thing generally. I would strongly like to see a guarante

Re: Prototypes

2001-09-03 Thread Damian Conway
> But since the current prototyping system... has a highly positive > pressure gradient compared to the surrounding air, Well...I think it's more a problem of "I do no' thin' dat word means wha' you thin' it means". People want prototypes to be parameter type specifiers, when they're actua

Re: Prototypes

2001-09-03 Thread Dan Sugalski
At 11:47 PM 9/3/2001 -0400, Ken Fox wrote: >"Bryan C. Warnock" wrote: > > { > > my $a = sub ($$) { code }; > > gork($a); > > } > > > > sub gork { > > my ($a) = shift; > > $a->(@some_list); # <- Here > > } > > > > The reason prototypes aren't checked at "Here" is because there real

Re: LangSpec: Statements and Blocks [first,last]

2001-09-03 Thread Damian Conway
iVAN wrote: > As we read in Damian Conway- Perl6-notes, there will be "...may be..." (Remember, I'm only the shambling henchman ;-) > a var-iterator that can be used to see how many times the cycle has > been "traversed" i.e. > > foreach my $el (@ary) { >.. do something

Re: LangSpec: Statements and Blocks

2001-09-03 Thread Damian Conway
Some feedback. > Syntax Overview > > Keywords > continue, do, else, elsif, for, foreach, given, goto, grep, if, last, > map, next, redo, sort, sub, unless, until, when, while C and C (C is not nearly so certain.) > Conditional Statement Modifiers > > 6. [ L

What's up with %MY?

2001-09-03 Thread Ken Fox
I haven't seen details in an Apocalypse, but Damian's Perl 6 overview has a bit about it. The Apocalypse specifically mentions *compile-time* scope management, but Damian is, uh, Damian. (DWIMery obviously. ;) Is stuff like: %MY::{'$lexical_var'} = \$other_var; supposed to be a compile-time o

Re: Prototypes

2001-09-03 Thread Bryan C . Warnock
A few more ideas to put down, lest I lay wake all night, thoughts churning... One. Presumably, there will be an op for the actual calling of the subroutine. That op can take an (extra) argument, with one of three values, that the prototype checking can get to. The first value indicates that th

Re: Prototypes

2001-09-03 Thread Ken Fox
"Bryan C. Warnock" wrote: > { > my $a = sub ($$) { code }; > gork($a); > } > > sub gork { > my ($a) = shift; > $a->(@some_list); # <- Here > } > > The reason prototypes aren't checked at "Here" is because there really > isn't a way to know what the prototype was. Um, that's not

Re: Prototypes

2001-09-03 Thread Bryan C . Warnock
On Monday 03 September 2001 10:46 pm, Dan Sugalski wrote: > At 10:32 PM 9/3/2001 -0400, Bryan C. Warnock wrote: > >On Monday 03 September 2001 10:27 pm, Dan Sugalski wrote: > > > >To me, that seems only a language decision. This could certainly > > > > handle that. > > > > > > Ah, but calling in

Re: Prototypes

2001-09-03 Thread Dan Sugalski
At 10:32 PM 9/3/2001 -0400, Bryan C. Warnock wrote: >On Monday 03 September 2001 10:27 pm, Dan Sugalski wrote: > > >To me, that seems only a language decision. This could certainly handle > > >that. > > > > Ah, but calling in the first way has two PMCs in as parameters, while the > > second has o

Re: Prototypes

2001-09-03 Thread Bryan C . Warnock
On Monday 03 September 2001 10:27 pm, Dan Sugalski wrote: > >To me, that seems only a language decision. This could certainly handle > >that. > > Ah, but calling in the first way has two PMCs in as parameters, while the > second has only one. Potentially at least. A world of difference there. A

Re: Prototypes

2001-09-03 Thread Dan Sugalski
At 10:17 PM 9/3/2001 -0400, Bryan C. Warnock wrote: >On Monday 03 September 2001 09:30 pm, Dan Sugalski wrote: > > A clever idea, and one I'd not though of. That's probably the best way to > > do it. Has some other issues, like do we allow prototypes like: > > > >sub foo ($$) {}; > > > > to be

Re: Prototypes

2001-09-03 Thread Bryan C . Warnock
On Monday 03 September 2001 09:30 pm, Dan Sugalski wrote: > A clever idea, and one I'd not though of. That's probably the best way to > do it. Has some other issues, like do we allow prototypes like: > >sub foo ($$) {}; > > to be called as: > >foo(@bar) > > if @bar has two elements in it?

Re: My, our, thems-over-theres.....

2001-09-03 Thread Bryan C . Warnock
A while ago, I posted some inconsistencies with scope declarators. (http:[EMAIL PROTECTED]/msg08028.html) A few more related notions $a = "test"; { chop(my $a = our $a = "hello"); # The lexical is chopped print "1-$a\n"; # But the global is printed } print "2-$a\

Re: Multiple-dispatch on functions

2001-09-03 Thread Dan Sugalski
At 07:46 AM 9/2/2001 +0100, Piers Cawley wrote: >Dan Sugalski <[EMAIL PROTECTED]> writes: > > Nope, the cost will be paid on all sub calls. We at least need to > > check on every sub call to see if there are multiple versions of the > > functions. (We can't tell at compile time if it's a single or

Re: Prototypes

2001-09-03 Thread Dan Sugalski
At 10:11 PM 9/2/2001 -0400, Bryan C. Warnock wrote: >On Sunday 02 September 2001 07:49 pm, Dan Sugalski wrote: > > On Sun, 2 Sep 2001, Bryan C. Warnock wrote: > > > Are prototypes going to be checked at runtime now? > > > > For methods, at least. Dunno about subs, that's Larry's call. I could make

Re: LangSpec: Statements and Blocks

2001-09-03 Thread Bryan C . Warnock
On Monday 03 September 2001 01:06 pm, Davíð Helgason wrote: > We will be adding 'try' & 'catch'. 'finally' also? (or 'finalize' :-) I've not heard anything definite on this. > > >16. [ LABEL: ] when expr : { block } # Note 5 > > > >[Note 5. 'when' is only a valid construct whe

Re: LangSpec: Statements and Blocks

2001-09-03 Thread Davíð Helgason
A few, hopefully relevant thoughts (some of them). Bryan C. Warnock wrote: >-- > >Perl 6 Reference - Statements and Blocks >(0.1/2001-09-01) A beauty to behold, this! >Syntax Overview > >Keywords >continue, do, else, elsif, for, foreach, given, goto, grep, if, las

Re: Source/Program metadata from within a program

2001-09-03 Thread Michael G Schwern
On Mon, Sep 03, 2001 at 04:56:28PM +0100, Nick Ing-Simmons wrote: > >The problem is, it appears DATA is only opened if there's an __END__ > >or __DATA__ tag. I don't remember it working this way... > > > >*shrug* We can fix that easy. :) > > No you can't - you run out of fd's pretty quick if ev