mishin
Recent Actions
-
Commented on Are roles only semantically different from inheritance?
When we on go then we go to understanding that role decrease complexity, if I found good module that realized role - I will use it...
-
Commented on How Perl Documentation Could Look Like
and also questions, why you didn't put your project http://kephra.sourceforge.net/site/en/home_news.shtml to github ? I really like it because it is easy to commit through a browser and, therefore, it is easy to add something useful....
-
Commented on How Perl Documentation Could Look Like
Hi Herbert, last time I use Kephra very often, it's lite, easy and work, thanks, yes http://tablets.perl6.org/ is very well-looking documentation...
-
Commented on Using WebKit to generate PDF slides
Super result, well done...
-
Commented on A Tale of CPAN Testers
thanks for notes...
-
Posted Convert perl var to yaml to mishin
I like yaml so use some idea from Devel-Refactor
yaml#!/usr/bin/env perl
######################################
# $URL: http://mishin.narod.ru $
# $Date: 2011-12-23 19:53:20 +03… -
Commented on Beginning Perl - Sneak Peek
cool, it's work;)...
-
Commented on Using system or exec safely on Windows
I use next function under win7: my $exec_shell = q{C:\Perl\bin\wperl.exe -x "C:\Perl\bin\perlcritic-gui" c:\Users\nmishin\Documents\git\perlcritic\perlcritic_profile.perlcriticrc } . $filename . q{ --run}; my $a = run_shell($exec_shell); sub run_shell { my ($cmd) = @_; my @args = (); my $EMPTY = q{}; my $ret...
-
Commented on The Triumphant Return of Zoidberg -- A Modular Perl Shell
i could’t install under windows https://gist.github.com/1467050 but it’s very interesting...
-
Commented on Padre Form Builder - A cross-platform GUI design solution for Perl
https://gist.github.com/1376344...
-
Commented on Padre Form Builder - A cross-platform GUI design solution for Perl
don't work under win7 ;(...
-
Commented on Padre 0.92, the release!
absolutely amazing, thanks a lot, good job, very good...
-
Commented on What I learned from YAPC::Brasil
use Data::Printer very interesting...
-
Commented on Padre, the upcoming 0.92 release...
Using Patch - unreal feature...
-
Commented on Happy Birthday, MetaCPAN!
what i search perl module - i go to https://metacpan.org/ it is best perl source point of the world! thanks metacpan, perl became better...
-
Commented on Padre is starting to smell a little bit like 1.0
I updated the padre in his windows 7 and it began to work much faster, thanks a lot, good job!...
-
Commented on A blog for YAPC::EU 2012
It was a great event, I got a lot of fun and made many necessary and useful friends, everything was organized on the highest level, thanks...
-
Commented on What's new in Perl 5.14
use v5.10.0;...
-
Commented on What's new in Perl 5.14
2Nick Patch thanks,work use 5.010; and even use 5.01; for ( 1 .. 10 ) { say;#wow is perltidy puts the semicolon ALT-SHIFT-F in Padre } say 'Victory';...
-
Commented on What's new in Perl 5.14
I think that I say from the command line does not work, it turns out I forgot to write use feature qw(switch say); use feature ':5.10'; # loads all features available in perl 5.10 Well, from the command line perl...
-
Commented on Yet Another Perl Podcast #2: Анонс
отличный подкаст, молодцы...
Comment Threads
-
autarch.urth.org commented on
Are roles only semantically different from inheritance?
They're really not the same, though they are both ways of implementing polymorphism.
First of all, roles are composed into classes. This means that all of a role's methods end up in the class as if they'd been defined there. There's no need to ever call "SUPER::foo". When a class consumes multiple roles, method conflicts can be detected at compile time and the role mechanism can throw an error. This forces developers to manually resolve the conflict, unlike subclassing. I suppose in theory you could write a subclassing mechinism like
use parent
that also did this, but wh… -
Zak B. Elep commented on
Are roles only semantically different from inheritance?
My take is that roles/traits provide "horizontal" composition of state and behaviors across (possibly unrelated) classes, while inheritance is a "vertical" composition between parent and child.
-
http://www.wgz.org/chromatic/ commented on
Are roles only semantically different from inheritance?
You're missing out on the allomorphic behavior of roles.
Consider the non-inheritance relationship, where one object delegates to another. You can't get the right answer about a type question by asking "Does the delegator inherit from the delegatee?", and you know that if you limit all of your questions about object behavior to "Does this object have a method of this name?" then you run into the false cognate problem (a tree has bark while a dog can bark; a student can bomb a test while a fighter jet can bomb a test target).
What you need is a way of asking "What named collec…
-
Aristotle commented on
Are roles only semantically different from inheritance?
Avoid complex inheritance hierarchies. This is equivalent to only allowing one level of inheritance.
Yes, but then in order to do non-trivial specialisation you have to start inheriting from multiple things, like you would compose multiple roles. And then you run into problems because multiple superclasses can provide the same method – which one do you call? Do you call both? Do the two methods on those two superclasses mean the same thing?
But with roles you do not have this problem. Why? Because roles become part of the class that consumes them, a…
-
jnareb commented on
Are roles only semantically different from inheritance?
Inheritance is (or should be) about is-a relationships fulfilling Liskov's substitution principle.
One example that I have seen about roles is GuardDog class example: in Dog class hierarchy, and consuming Guard role (which can be consumed by many different unrelated classes).
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.