Brian Candler wrote:
> OTOH, the Ruby version gives the right answer :-)
I know this is only half-serious, but this is a major reason why I think
Ruby (and other well-designed scripting languages) are really, really
good. I don't really care if many things run 10x slower in Ruby or (as
Gabriele found out) take up much more memory. The fact that you don't
have to know about your platform's integer size is so nice!
I'm currently struggling in C trying to choose the right data types for
some variables. They're nominally integers, but I also need a way of
handling errors, and since I can't throw exceptions, my options are
limited. So, instead of doing interesting, challenging programming, I'm
stuck tweaking data types. Sure, what I'm doing couldn't be done in
Ruby. Sure, it will run faster when it's done. But I like languages
that are programmer-friendly. C isn't, Ruby is.
Ben