Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Solving compositional problems with Perl 6 rolesby BrowserUk (Patriarch) |
on Aug 22, 2004 at 02:39 UTC ( [id://384861]=note: print w/replies, xml ) | Need Help?? |
$elf does Thief; # hmm ... that reads funny Maybe that's because when we coudn't divorce the person from their actions, naming a (sub)class Thief made sense, but now we can have groups of actions that can be enacted by a range of People, maybe we should name such groups by the collective term for those actions:
And
I wonder if P6 will allow lists to does, is, has and the like? It would certainly make the syntax more friendly. Reads quite nicely, and seems quite intuative that if the employee gives up first aiding, removing that Role has little impact on the rest of his persona. Maybe:
Then that dear old Elf from earlier sees the light and repents:
Of course, it doesn't flow completely right. There would be no point in:
Unless the compiler has the smarts to turn that into:
:)
In Section
Meditations
|
|