4 ms·
Verbosity. class Point { has Int $.x is rw; has Int $.y is rw; method clear() { $.x = 0; $.y = 0; } } :)
by colomon 14y ago
Verbosity.
class Point {
has Int $.x is rw;
has Int $.y is rw;
method clear() { $.x = 0; $.y = 0; }
}
:)
- dkoch 14y agoPerl 6 is / will be sweet :)
- colomon 14y agoPerl 6 is sweet, and will be sweeter when it has better performance. :)
- deleted 14y ago[deleted]
- singingfish 14y agoLooks like a noble attempt to remove perl5 and ruby pain in the arse points simultaneously. Wonder if it will ever come to anything ...?
- draegtun 14y agoPerl 5.18 may have the following: use mop; class Point { has $x = 0; has $y = 0; method clear { ($x, $y) = (0, 0) } } ref: https://github.com/stevan/p5-mop/blob/master/t/000-examples/001-basic-example.t https://github.com/stevan/p5-mop/blob/master/t/000-examples/...