鳩舎

レースしない

Entries from 2013-04-29 to 1 day

Scala の Trait

scala> class M { def m() { println("hello"); } } defined class M scala> (new M).m() hello scala> trait N { def m() { println("hi"); } } defined trait N scala> (new M with N).m() <console>:10: error: anonymous class $anon inherits conflicting member</console>…

Perl 6 の does と ^add_role の違い

@kuzuha から素敵情報が届いたので。 @rosylilly gist.github.com/kuzuha/5477051— デブ (@kuzuha) April 28, 2013 @rosylilly add_role は破壊的ではない。remove_role はない。— デブ (@kuzuha) April 28, 2013 面白い。試す。 > class c {}; (c) > role r…