Re: Will subroutine signatures apply to methods in Perl6

2001-09-01 Thread Ken Fox
Uri Guttman wrote: [Re: use strict 'typing'; my $rex = new Dog; $rex.bark] > then it should be a compile time error at the assignment to $rex > and not later. you can't trace $rex at compile time to see what > kind of object (if any) was assigned to it. so the illegal method > call can't (easily)

RE: Will subroutine signatures apply to methods in Perl6

2001-08-25 Thread Dan Sugalski
At 09:18 PM 8/24/2001 -0700, Brent Dax wrote: >I meant that, if we >know $spot is supposed to have a Dog in it, can we avoid checking if it >really does (at least some of the time) and maybe shuck some overhead by >doing so? Perhaps we only check after each assignment to $spot, and >when we check

Re: Will subroutine signatures apply to methods in Perl6

2001-08-25 Thread Piers Cawley
"Brent Dax" <[EMAIL PROTECTED]> writes: > # From: Uri Guttman [mailto:[EMAIL PROTECTED]] > # BD> equivalent) in method lookups? In other words, if > # $spot is declared to > # BD> hold a Dog, can we assume that it does, thus skipping > # the check with > # BD> 'ref' normally used for method

Re: Will subroutine signatures apply to methods in Perl6

2001-08-25 Thread Piers Cawley
Uri Guttman <[EMAIL PROTECTED]> writes: > > "DC" == Damian Conway <[EMAIL PROTECTED]> writes: > > DC> One might also envisage a C pragma to require > DC> that all lexicals be typed. > > do you mean lexical params in a sub signature? or all lexicals in the > current scope which contains

RE: Will subroutine signatures apply to methods in Perl6

2001-08-25 Thread Brent Dax
# -Original Message- # From: Uri Guttman [mailto:[EMAIL PROTECTED]] # Sent: Friday, August 24, 2001 8:56 PM # To: [EMAIL PROTECTED] # Cc: [EMAIL PROTECTED] # Subject: Re: Will subroutine signatures apply to methods in Perl6 # # # >>>>> "BD" == Brent Dax &

RE: Will subroutine signatures apply to methods in Perl6

2001-08-25 Thread Brent Dax
# -Original Message- # From: Uri Guttman [mailto:[EMAIL PROTECTED]] # Sent: Friday, August 24, 2001 4:09 PM # To: [EMAIL PROTECTED] # Cc: [EMAIL PROTECTED] # Subject: Re: Will subroutine signatures apply to methods in Perl6 # # # >>>>> "DC" == Damian Conway &

Re: Will subroutine signatures apply to methods in Perl6

2001-08-25 Thread Damian Conway
Uri writes: > DC> One might also envisage a C pragma to require > DC> that all lexicals be typed. > > do you mean lexical params in a sub signature? or all lexicals in the > current scope which contains the pragma? any(@above). Some people will want one; some, the other. We

Re: Will subroutine signatures apply to methods in Perl6

2001-08-24 Thread Uri Guttman
> "BD" == Brent Dax <[EMAIL PROTECTED]> writes: BD> # BD> my $rex=Dog.new;#ok at BD> # this point... BD> # BD> # BD> $spot.bark(); #ok BD> # BD> $fido.bark(); #ok BD> # BD> $rex.bark();

Re: Will subroutine signatures apply to methods in Perl6

2001-08-24 Thread Uri Guttman
> "BD" == Brent Dax <[EMAIL PROTECTED]> writes: BD> # From: Uri Guttman [mailto:[EMAIL PROTECTED]] BD> # use strict 'typing' ; BD> # BD> # my $foo = Dog.new() ; BD> # BD> # that fails at compile time. BD> # BD> # my Dog $spot = Dog.new() ; BD> # BD>

Re: Will subroutine signatures apply to methods in Perl6

2001-08-24 Thread Uri Guttman
> "DC" == Damian Conway <[EMAIL PROTECTED]> writes: DC> One might also envisage a C pragma to require DC> that all lexicals be typed. do you mean lexical params in a sub signature? or all lexicals in the current scope which contains the pragma? required typing for all lexicals feels too

Re: Will subroutine signatures apply to methods in Perl6

2001-08-23 Thread Damian Conway
Garrett asked: > Any word from on high whether subroutine signatures will apply to > methods in Perl6? Well, I hardly qualify as "on high" ("on *a* high" perhaps?) but I can definitely say this: They will and they won't. ;-) At compile-time, signatures can only be honoured if the com

Re: Will subroutine signatures apply to methods in Perl6

2001-08-21 Thread David L. Nicol
Garrett Goebel wrote: > > Any word from on high whether subroutine signatures will apply to methods in > Perl6? There's RFC128 and RFC97... but they both mostly dodge the issue of > methods. > > The absense of method signatures for specifying required, optional, and > named parameters... not to

Will subroutine signatures apply to methods in Perl6

2001-08-14 Thread Garrett Goebel
Any word from on high whether subroutine signatures will apply to methods in Perl6? There's RFC128 and RFC97... but they both mostly dodge the issue of methods. The absense of method signatures for specifying required, optional, and named parameters... not to mention type-checking for validation