Re: Roles are fundamentally broken?

2019-01-30 Thread yary
I opened https://github.com/rakudo/rakudo/issues/2662 - but keyword ought to be associative https://github.com/rakudo/rakudo/issues/2663 - Fix Role private methods documentation, implementation -y

Re: Roles are fundamentally broken?

2019-01-30 Thread Vadim Belman
Have you tried printing ^mro of $best_friend? You would be surprised! Instead, try compiling the following: role R1 { method !priv { say "R1::priv" } } role R2 { method !priv { say "R2::priv" } } class Foo does R1 does R2 { } Oops And this I

Re: Roles are fundamentally broken?

2019-01-30 Thread JJ Merelo
El mié., 30 ene. 2019 a las 7:48, yary () escribió: > > Yet, have a look at my example with private methods > > All of the bug reports, code excerts use regular (public) methods. Do you > have code to share with !private_methods and/or submethods? I just made an > example, will be at the end of

Re: Roles are fundamentally broken?

2019-01-29 Thread yary
> Yet, have a look at my example with private methods All of the bug reports, code excerts use regular (public) methods. Do you have code to share with !private_methods and/or submethods? I just made an example, will be at the end of this email > If accidentally two roles declare same private

Re: Roles are fundamentally broken?

2019-01-29 Thread Vadim Belman
The role must not be a class – that's true. Yet, have a look at my example with private methods. If accidentally two roles declare same private method – I either must reject using one of them or resolve the conflict manually... oh, wait, I have no idea of what is that private method is all

Re: Roles are fundamentally broken?

2019-01-29 Thread Vadim Belman
> On Jan 29, 2019, at 3:43 AM, Simon Proctor wrote: > > I think part of the issue is that fundamentally Roles are intended to be a > way of doing non inheritance based classes. So composing Roles from other > Roles is an anti pattern. But why? As I stated in my previous reply: isn't it

Re: Roles are fundamentally broken?

2019-01-29 Thread Vadim Belman
> On Jan 29, 2019, at 1:32 AM, yary wrote: > > https://github.com/rakudo/rakudo/issues/2657 > - looks like an outright bug, > to me. > > I don't know about "the big picture" but you hit a not-explicitly-documented > case. > > Referring to >

Re: Roles are fundamentally broken?

2019-01-29 Thread Simon Proctor
I think part of the issue is that fundamentally Roles are intended to be a way of doing non inheritance based classes. So composing Roles from other Roles is an anti pattern. On Tue, 29 Jan 2019, 06:32 yary https://github.com/rakudo/rakudo/issues/2657 - looks like an outright > bug, to me. > > I

Re: Roles are fundamentally broken?

2019-01-28 Thread yary
https://github.com/rakudo/rakudo/issues/2657 - looks like an outright bug, to me. I don't know about "the big picture" but you hit a not-explicitly-documented case. Referring to https://docs.perl6.org/language/objects#index-entry-declarator_role-Roles - *When a role is applied to a class, the

Roles are fundamentally broken?

2019-01-28 Thread Vadim Belman
Hi all, I have filled another role-related issue today. While the issue is just another bug in the compiler, it stems from the thing which I consider to be a big problem about what a Role is in Perl6. Or, more precisely, from the fact that Role is an entity deprived of its civil rights. What