2007-07-24から1日間の記事一覧

Javaでtimes

最近++に関する話題が多いので、Javaで++の隠ぺいを試みる。 public class CountUtils { public static abstract class InnerProc<E> { public abstract proc(int i); protected E getResult() { return null; } } public static <E> E times(int times, InnerProc<E></e></e></e>…

Rubyが嫌いだった理由

学生の頃はRubyが嫌いで嫌いでたまらなかった。 p "Hoge, World!" if a > 0 なんて書けてしまえるくせにbegin-endだったりするところが嫌いだった。 10.times {|i| p i } なんて書けてしまえるのに++がないのが嫌いだった。 nullじゃなくてnilなのが嫌いだっ…