Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Aaron Sherman
Jonathan Lang wrote: I hope not. My understanding is that '{ ... }' is supposed to represent the notion of abstract routines: if you compose a role that has such routines into a class or package, I'd expect the package to complain bitterly if any such routines are left with yada-yadas as their c

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Trey Harris
In a message dated Fri, 29 Sep 2006, Aaron Sherman writes: First the high-level point: I'm dropping the RFC, because, as TimToady pointed out on IRC, we're not quite far enough down the line to see the breadth or certainty of the need yet. Yes, but I don't think the conversation should stop.

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Trey Harris
In a message dated Thu, 28 Sep 2006, Jonathan Lang writes: while roles can be abstract, classes and packages should not be. Really? I think I need to let that sink in and percolate a bit. I'm rather fond of creating abstract superclasses to factor out common object-management code. I have m

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Jonathan Lang
Terminology issue: IIRC (and please correct me if I'm wrong), Perl 6 uses 'module' to refer to 'a perl 5-or-earlier module', and uses 'package' to refer to the perl 6-or-later equivalent. Aaron Sherman wrote: Details: Larry has said that programming by contract is one of the many paradigms that

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Miroslav Silovic
Aaron Sherman wrote: In the RFC, I was trying to develop a method by which a module could assert a stricture (consider this part of "use strict" in Perl 6 if you will) that would constrain the CALLER of that module (as well as the module itself, of course) to a particular signature template for

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Larry Wall
On Fri, Sep 29, 2006 at 12:35:43AM -0700, Trey Harris wrote: : If you define a BUILD in a role, will it be called when an object of a : class that does the role is instantiated, as part of the .new BUILD walk? Yes. That is mentioned in A12, even if S12 didn't make it explicit. At least S12:531 i

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Mark J. Reed
On 9/29/06, Jonathan Lang <[EMAIL PROTECTED]> wrote: Terminology issue: IIRC (and please correct me if I'm wrong), Perl 6 uses 'module' to refer to 'a perl 5-or-earlier module', and uses 'package' to refer to the perl 6-or-later equivalent. Other way around. "package" is Perl 5, because that'

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Jonathan Lang
Mark J. Reed wrote: Jonathan Lang wrote: > Terminology issue: IIRC (and please correct me if I'm wrong), Perl 6 > uses 'module' to refer to 'a perl 5-or-earlier module', and uses > 'package' to refer to the perl 6-or-later equivalent. Other way around. "package" is Perl 5, because that's the P5

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Larry Wall
On Fri, Sep 29, 2006 at 02:05:06PM -0400, Mark J. Reed wrote: : On 9/29/06, Jonathan Lang <[EMAIL PROTECTED]> wrote: : >Terminology issue: IIRC (and please correct me if I'm wrong), Perl 6 : >uses 'module' to refer to 'a perl 5-or-earlier module', and uses : >'package' to refer to the perl 6-or-lat

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Larry Wall
On Fri, Sep 29, 2006 at 01:24:12PM -0700, Larry Wall wrote: : method postfix:<::> () { return %.HOW.packagehash } Urque. Actually, that'd have to be %($.HOW.packagehash) or $.HOW.packagehash.{}, since what I wrote there would mean %(self.HOW).packagehash instead, which might work accidentally

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Jonathan Lang
Larry Wall wrote: but only if self.HOW does Hash. And here I thought you were a responsible, law-abiding citizen... :P -- Jonathan "Dataweaver" Lang

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Mark J. Reed
On 9/29/06, Jonathan Lang <[EMAIL PROTECTED]> wrote: And here I thought you were a responsible, law-abiding citizen... :P And so it begins. I daresay there will be no shortage of jokes among P6ers about "does Hash" ... -- Mark J. Reed <[EMAIL PROTECTED]>