Looking forward to see what you come up with. I do mix in a role into both
Attribute and ClassHOW. But delving into the core didn't help to find a better
approach than the one I finally took. Two subtle aspects are to be kept in
mind: support for roles; and knowing the object attribute is
> The M in Moose is for Metamodel, and if I wanted custom object behavior in
> Perl6, I would subclass it's standard metamodel and then override what needs
> changing eg STORE/FETCH.
>
> No idea how to do that, or it's feasiblity. Just have the impression that the
> point of having a
> In Vadim's recent post about his AttrX::Moo module he describes his P6
> solution for bringing functionality he was used to having in P5 via Moo.
>
> (In another post I've asked about the option and relevance of using
> Moo:from in P6. If you reply to this post please consider also
>
Let me correct you in one aspect. It's not my company which is using Perl. It's
me. My department is nothing about programming but VoIP and whatever else
around it. Use of Perl for supportive tasks is my own choice. Yet, mixing of
languages is definitely something I'm trying to avoid at least
FWIW, I have been trying to get
https://modules.perl6.org/dist/Object::Trampoline to work with lazy attributes:
so far this has gotten me into an infiniloop . Perhaps you can find out why
:-)
> On 5 Sep 2018, at 23:10, Simon Proctor wrote:
>
> So I have a thought for how to do lazy
I have currently worked around the issue by changing the order of conditions in
my code so just testing for DefiniteHOW and SubsetHOW first. But generally it
arose from a need to determine base type of a typed attribute. Because there is
common method for this each particular case must be
I agree to the most of your writing. Just a couple of notes.
> > my Array[Str] $a = ["a", "b", "c"];
> > my Str @a = ["a", "b", "c"];
> >
> First, there's co/contra variance of sub-typing. The first paragraph of
> wikipedia page is
>
The M in Moose is for Metamodel, and if I wanted custom object behavior in
Perl6, I would subclass it's standard metamodel and then override what
needs changing eg STORE/FETCH.
No idea how to do that, or it's feasiblity. Just have the impression that
the point of having a metamodel is for this
Lets take the question of 'do I really need AttrX::Mooish' out of the scope and
postulate for now that I do need it; and no, I don't want to use any of Perl5
solutions. Just to focus more on Proxy itself.
What other approaches to implement laziness in Perl6?
Method based. It could either be
This one is easy to explain. My primary selling point of using Perl6 is its
multithreading capabilities. The final code would have to deal with a really
big number of devices and parallel processing is of a great help here.
Resource-vise it's way more reasonable to have a single process with
In Vadim's recent post about his AttrX::Moo module he describes his P6
solution for bringing functionality he was used to having in P5 via Moo.
(In another post I've asked about the option and relevance of using
Moo:from in P6. If you reply to this post please consider also
replying to that one.
Vadim wrote:
> BTW, while researching the core sources I discovered a potential problem
with DefiniteHOW and SubsetHOW. They both define their own find_method()
which is re-delegating to their base type HOW.find_method. But they don't
support named parameters. Combined with classes with FALLBACK
Hi Vadim,
This is for you and anyone else interested in a little bit about tricky
aspects of sub-types, of P6, of my perspective on learning in response to
WTF? moments, and P6 strengths and weaknesses in relation to the foregoing.
Vadim wrote:
> my Array[Str] $a = ["a", "b", "c"];
> my Str @a
The real problem is that, in the absence of Proxy, rakudo can optimize a
bunch of things away because it knows it has full control of the value. But
if it encounters a Proxy, it has to assume that the Proxy might be
manipulating state outside of the current thread, or even outside of
rakudo, that
This is the first in a series of a half dozen responses to Vadim's
AttrX::Moo post that replace a couple earlier failed attempts to post here.
I apologize if there end up being repeats or my following up with several
responses is inappropriate.
Hi Vadim. I'm making this my first post because it
15 matches
Mail list logo