Michael Lake wrote:
Hi all
In response to:
I'm not a ruby programmer, but can I ask why you'd make this part of a
class? Surely a function roundNumbers(x) would work just as well? The
whole class infrastructure seems rather redundant and makes what
should be simple code overly verbose.
O Plameras wrote:
It's part of an effort to discipline my programming-mental-attitude
to think object-oriented. So, eventually, it becomes natural and
> conforming with the concept that Ruby is pure object-oriented.
You mean then that when you reach Ruby Nirvana your mind wouldn't even
think of using a function when it might be simpler and clearer than
using an object? :-)
No, absolutely not. On the other hand, when there are more exercises,
I'll stick the solutions in that class
by modifying little bits and pieces of the codes. No need to go through
similar motions. I like to think
it is investing for the future.
As a matter of interest can someone post their alternative codes ?
O Plameras
_______________________________________________
coders mailing list
[email protected]
http://lists.slug.org.au/listinfo/coders