12/02/12 10:59:48.20
>>825
そんな暗号の様なコードは読み手に不要な知識を要求するので可読性が低い
大規模開発ではこの程度のコード量の増加は誤差の範囲
def f(x, y)
if !x.kind_of?(Integer) then
raise TypeError
end
if !y.kind_of?(Integer) then
raise TypeError
end
z = x + y
if !z.kind_of?(Integer) then
raise TypeError
end
return z
end
def g(x)
if !(-1 < x && x < 1) then
raise RuntimeError
end
print x
end