On Thu, 10 Apr 2014, Thalhammer, Jeffrey Ryan wrote:
Can you categorise them down into a few mechanism types, and then define new
syntax to
represent and expand each out into a particular implementation of that
underlying
mechanism?
I think I see where you are going. If I can distill things down to a few
conventions, then I can
use configuration or a type of DSL to do the work. Does that sound right?
Or introduce new syntax like MooseX::Declare, or they advocate for 5.14+
Devel::CallParser, Function::Parameters and Keyword::Simple which I've not
looked into any myself btw:
http://search.cpan.org/~ether/MooseX-Declare-0.38/lib/MooseX/Declare.pm#WARNING
I've been storing everything in an attribute slot with MooseX::Privacy's
'Private' or
'Protected' traits. However there are constraints around declaring them
like that in
a Role, something I want to explore when I get time.
Thanks for the suggestion, I'll look into that.
It changed my code in a fundamentally better way, I just hope I can get them
working with Roles - both to be private/protected to the Instance, as well as
to the Role itself like where p5-mop-redux is going *happydance*
If we can declare an interface with typed parameter slots, method
signatures and all
that jazz - I for one would find it incredibly useful, for the same type
of
de-coupling issues that you're dealing with above.
Sometimes I feel we have turned Perl into Java. But that's probably ok,
because they have turned
Java into Perl. Goldilox had the right idea.
I wouldn't go that far, I look at it more like Perl is catching up to the 1960s.
Attribute slots with Types in Perl was a game changer for me. I suspect that
typed method parameters, and signatures, are going to be equally important.
Thanks for sharing your wisdom. I'll sleep on it and see how things go
tomorrow.
Cheers, though I'm sure there are many better viewpoints and ideas that others
on the list can share! I tend to go off exploring stuff that seems obscure to
others: but getting data hiding and encapsulation correct is at the core of
everything, I suspect.
--
Niall Young
[email protected]