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) be

Re: Will subroutine signatures apply to methods in Perl6

2001-08-25 Thread Damian Conway
Uri writes: DC One might also envisage a Cuse strict 'typing' 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,

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 [EMAIL PROTECTED] writes: # # DC

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 [EMAIL PROTECTED] writes: ... # BD Two

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 dispatch?

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 we

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 Cuse strict 'typing' 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

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 # that is ok.

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();#ERROR: $rex BD

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