| That's not simplicity. *This* is simplicity. |
[Apr. 20th, 2006|01:55 pm] |
James Robertson recently posted this to demonstrate the 'simplicity' of Smalltalk.
Frankly, I'm baffled. Simple? I don't think so. Consider the Ruby equivalent:
def factorial(x)
raise ArgumentError if x < 0
return 1 if x <= 1
x * factorial( x - 1 )
end
Which would you rather look at? Oh, and Haskell has everyone beat:
fac n | n > 0 = product [1..n]
|
|
|