Re: but true

2003-12-23 Thread Larry Wall
On Tue, Dec 23, 2003 at 07:46:56PM +, Piers Cawley wrote: : Will this approach allow for the removal of a property? (I'm currently : stuck for a suggested syntax...) If a property is an enumified sort of role, then in general you don't disable a property by removing it, but by setting the valu

Re: but true

2003-12-23 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > On Fri, Dec 19, 2003 at 10:36:01AM -0600, Adam D. Lopresto wrote: > : I've been trying to follow the recent discussion on roles and > : properties and traits and such, but there's something that bugs > : me. If I understand correctly, adding a role at runti

Re: but true

2003-12-20 Thread Simon Cozens
[EMAIL PROTECTED] (Larry Wall) writes: > is classof($x) Ouch. $x's class isn't a property or trait of it? > class AnonClass is classof($x) does FooBar { }.bless($x, foobar => bar) I don't understand what the bit at the end is doing. This is calling .bless on the overriden method? And I'm not

Re: but true

2003-12-20 Thread Jonathan Lang
Larry Wall wrote: > Maybe there's an intermediate syntactic form like: > > $x but subclass MyClass does FooBar[bar] { } IMHO, C should be defined as generating a singleton class that derives from the variable's class and composes a specified role - but not neccessarily a I role. How about de

Re: but true

2003-12-19 Thread Larry Wall
On Fri, Dec 19, 2003 at 12:24:29PM -0700, Luke Palmer wrote: : Abhijit A. Mahabal writes: : > On Fri, 19 Dec 2003, Larry Wall wrote: : > : > > On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote: : > > : Of course, when I do: : > > : : > > : my $x = 0 but (true|false); : > > : : > >

Re: but true

2003-12-19 Thread Luke Palmer
Abhijit A. Mahabal writes: > On Fri, 19 Dec 2003, Larry Wall wrote: > > > On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote: > > : Of course, when I do: > > : > > : my $x = 0 but (true|false); > > : > > : then what happens? > > > > That's the problem with making them methods. Any

Re: but true

2003-12-19 Thread Abhijit A. Mahabal
On Fri, 19 Dec 2003, Larry Wall wrote: > On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote: > : Of course, when I do: > : > : my $x = 0 but (true|false); > : > : then what happens? > > That's the problem with making them methods. Any such operational > definition is going to get y

Re: but true

2003-12-19 Thread Larry Wall
On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote: : Of course, when I do: : : my $x = 0 but (true|false); : : then what happens? That's the problem with making them methods. Any such operational definition is going to get you in trouble. I think I like them better as enums, be

Re: but true

2003-12-19 Thread Larry Wall
On Fri, Dec 19, 2003 at 10:36:01AM -0600, Adam D. Lopresto wrote: : I've been trying to follow the recent discussion on roles and properties and : traits and such, but there's something that bugs me. If I understand : correctly, adding a role at runtime using but won't override any methods : defin

Re: but true

2003-12-19 Thread Austin Hastings
--- Austin Hastings <[EMAIL PROTECTED]> wrote: > > --- "Adam D. Lopresto" <[EMAIL PROTECTED]> wrote: > > #Actually, how do we define this? > > method asBoolean(Complex $self:){ > > return $self.real || $self.imag; > > } > > > > > > ... > > > > > > then somewhere in a function > > > >

Re: but true

2003-12-19 Thread Austin Hastings
--- "Adam D. Lopresto" <[EMAIL PROTECTED]> wrote: > I've been trying to follow the recent discussion on roles and > properties and traits and such, but there's something that bugs me. I tried for weeks before I could download the "traits paper". I finally got it this week, and it has clarified s