Tohoku Open Source Conference 2008
- 7. class Sample
def initialize(str)
@str=str
end
def str
@str
end
def str=(str)
@str=str
end
end
- 10. http://www.rubyist.net/~matz/20071013.html
Love/Hate
1a 1b 2a 2b 3a 3b 4a 4b
Ratio
Ruby 10800 11700 914 9850 3140 3970 150 173 7.189
Lisp 758 528 7010 5650 2620 8 216 149 4.536
Python 9420 9860 9340 11600 6820 5430 316 388 4.356
Smalltalk 191 200 2060 3020 8 6 116 647 3.806
Perl 14500 705 15600 916 7060 4930 801 1410 2.859
JavaScript 949 1170 5410 4280 1890 1480 1300 941 1.773
Java 813 23000 955 20800 13900 506 800 13600 1.605
C 6520 6550 795 651 14900 12500 2450 1850 0.766
PHP 852 759 668 652 4260 5170 1110 1180 0.324
google Love Like Hate
- 12. Java Ruby
class Sample{
public static void main(String[] argv) {
System.out.println(“Hello world”); print “Hello world¥n”
}
}
Perl Ruby
if ($a==0) { if a==0
print “Hello world¥n”; print “Hello world¥n”
} end