http://qs1969.pair.com?node_id=769584


in reply to Re: Language features affect style
in thread Language features affect style

Indeed, which is why we've gotten rid of most of Perl 5's (not so) beloved boilerplate in Perl 6. Here's the same code (more or less) in Perl 6:
class Foo { has $!salary; method !private_method ($factor = 2) { $!salary *= $factor } method salary { self!private_method(10); $!salary } } my Foo $foo .= new(:salary(100)); say "salary is ", $foo.salary;
This may or may not tweak the refactoring knob back toward methods; Perl 6 is still not Java, after all.