Re: How do I recognize an array element access?

2004-02-22 Thread Luke Palmer
Austin Hastings writes: > Suppose I want to say: > > sub sublist(@a, $start, $cnt) { > return @a[$start] +next --$cnt; > } > > where +next is a binary macro that takes as its lhs an array element > access, and its rhs a number, and returns a list of the array element > followed by the nex

How do I recognize an array element access?

2004-02-22 Thread Austin Hastings
Suppose I want to say: sub sublist(@a, $start, $cnt) { return @a[$start] +next --$cnt; } where +next is a binary macro that takes as its lhs an array element access, and its rhs a number, and returns a list of the array element followed by the next RHS elements. It seems obvious to me

Re: Traits: to renew OO inheritance in a hacker style discussion

2004-02-22 Thread chromatic
On Sun, 2004-02-22 at 11:34, stevan little wrote: > One thing that I noticed was that the authors seem to not intend > Traits to be thought of as being like Classes. As a matter of fact > they distinguish Traits from Classes in their "Trait Language" > (contained in the above paper). So the idea o

Re: Traits: to renew OO inheritance in a hacker style discussion

2004-02-22 Thread stevan little
A long time ago ... Dan said: Roles'll get thrown on individual variables and values, sure, but when I'm writing a class (Yes, I know, but lets suspend disbelief for a moment :) I'm not generally going to put a pre-existing role on a class--I'll just inherit from the darned thing. Roles, whe