Re: class interface of roles

2006-10-02 Thread Brad Bowman
Sam Vilain wrote: TSa wrote: is this subject not of interest? I just wanted to start a discussion about the class composition process and how a role designer can require the class to provide an equal method and then augment it to achieve the correct behavior. Contrast that with the need to do

Re: Re: class interface of roles

2006-10-02 Thread Stevan Little
On 10/2/06, Brad Bowman [EMAIL PROTECTED] wrote: Sam Vilain wrote: TSa wrote: is this subject not of interest? I just wanted to start a discussion about the class composition process and how a role designer can require the class to provide an equal method and then augment it to achieve the

[svn:perl6-synopsis] r12561 - doc/trunk/design/syn

2006-10-02 Thread audreyt
Author: audreyt Date: Mon Oct 2 07:45:13 2006 New Revision: 12561 Modified: doc/trunk/design/syn/S06.pod Log: * S06: Excise the word Multimethod in places where it also referred to multisubs. Modified: doc/trunk/design/syn/S06.pod

Re: class interface of roles

2006-10-02 Thread Jonathan Lang
Brad Bowman wrote: Hi, Did you mean to go off list? No, I didn't. Jonathan Lang wrote: Brad Bowman wrote: Does the class GenSquare does GenEqual does GenPointMixin line imply an ordering of class composition? No. This was a conscious design decision: the order in which you compose

Re: Re: class interface of roles

2006-10-02 Thread Jonathan Lang
Stevan Little wrote: Brad Bowman wrote: How does a Role require that the target class implement a method (or do another Role)? IIRC, it simply needs to provide a method stub, like so: method bar { ... } This will tell the class composer that this method must be created before everything is

Don't tell me what I can't do!

2006-10-02 Thread Jonathan Lang
Twice now in the last week or so, I've run across suggestions to the effect of including syntax that forbids otherwise valid code from being used. First was during the discussion about coming up with a way to program by contract, where the poster suggested that a means of saying any declaration

Re: Don't tell me what I can't do!

2006-10-02 Thread jerry gay
On 10/2/06, Jonathan Lang [EMAIL PROTECTED] wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? use strict;

Re: Don't tell me what I can't do!

2006-10-02 Thread Craig DeForest
On Oct 2, 2006, at 10:26 AM, jerry gay wrote: On 10/2/06, Jonathan Lang [EMAIL PROTECTED] wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? use strict;

Re: Don't tell me what I can't do!

2006-10-02 Thread Jonathan Lang
jerry gay wrote: Jonathan Lang wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? use strict; Hmm... granted. But that does tend to sidestep the main

Re: Don't tell me what I can't do!

2006-10-02 Thread Andy Armstrong
On 2 Oct 2006, at 17:48, Jonathan Lang wrote: The examples I gave involved specific roles or routines being forbidden from use in certain situations; my gut instinct is that if you don't think that it's appropriate to use a particular role or routine somewhere, you should simply not use it

Re: Don't tell me what I can't do!

2006-10-02 Thread Smylers
jerry gay writes: On 10/2/06, Jonathan Lang [EMAIL PROTECTED] wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? use strict; That's different:

Re: Don't tell me what I can't do!

2006-10-02 Thread Dave Whipp
Smylers wrote: use strict; That's different: it's _you_ that's forbidding things that are otherwise legal in your code; you can choose whether to do it or not. Which suggests that the people wanting to specify the restrictions are actually asking for a way to specify additional strictures

Re: Don't tell me what I can't do!

2006-10-02 Thread Jonathan Lang
Dave Whipp wrote: Smylers wrote: use strict; That's different: it's _you_ that's forbidding things that are otherwise legal in your code; you can choose whether to do it or not. Which suggests that the people wanting to specify the restrictions are actually asking for a way to specify

Re: Don't tell me what I can't do!

2006-10-02 Thread Dave Whipp
Jonathan Lang wrote: Before we start talking about how such a thing might be implemented, I'd like to see a solid argument in favor of implementing it at all. What benefit can be derived by letting a module specify additional strictures for its users? Ditto for a role placing restrictions on

Re: Don't tell me what I can't do!

2006-10-02 Thread Jonathan Lang
Dave Whipp wrote: Or we could view it purely in terms of the design of the core strict and warnings modules: is it better to implement them as centralised rulesets, or as a distributed mechanism by which core modules can register module-specific strictures/warnings/diagnostics. Question: if

Re: Don't tell me what I can't do!

2006-10-02 Thread Dave Whipp
Jonathan Lang wrote: Dave Whipp wrote: Or we could view it purely in terms of the design of the core strict and warnings modules: is it better to implement them as centralised rulesets, or as a distributed mechanism by which core modules can register module-specific

Re: Don't tell me what I can't do!

2006-10-02 Thread Larry Wall
On Mon, Oct 02, 2006 at 02:01:34PM -0700, Jonathan Lang wrote: : Dave Whipp wrote: : Or we could view it purely in terms of the design of the core strict : and warnings modules: is it better to implement them as centralised : rulesets, or as a distributed mechanism by which core modules can :

Re: Don't tell me what I can't do!

2006-10-02 Thread Luke Palmer
On 10/2/06, Jonathan Lang [EMAIL PROTECTED] wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? This reminds me of the endless student proofs that trisect

Re: class interface of roles

2006-10-02 Thread chromatic
On Monday 02 October 2006 08:58, Jonathan Lang wrote: I wonder if it would be worthwhile to extend the syntax of roles so that you could prepend a no on any declarative line, resulting in a compilation error any time something composing that role attempts to include the feature in question.  

Re: Re: Re: class interface of roles

2006-10-02 Thread Stevan Little
On 10/2/06, Jonathan Lang [EMAIL PROTECTED] wrote: This notion of exclusionary roles is an interesting one, though. I'd like to hear about what kinds of situations would find this notion useful; but for the moment, I'll take your word that such situations exist and go from there. Well to be

Re: Don't tell me what I can't do!

2006-10-02 Thread Aaron Sherman
Jonathan Lang wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? use strict;

Re: Don't tell me what I can't do!

2006-10-02 Thread jerry gay
On 10/2/06, Aaron Sherman [EMAIL PROTECTED] wrote: Jonathan Lang wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? use strict; you're so twelve