One is tempted to ask why the module has an interface that forces a user to create an instance, give the instance a number, and then retrieve a string from the instance when a simple class method exported would have worked more easily. I mean, then I have to remember whether the current number in the instance is the one I want-- which is the sort of "internal state of object" knowledge the rest of my program shouldn't have to be thinking about.
This is exactly what I mean by "pointless OO". Even your suggested class method is "pointless OO" to me. It doesn't buy you anything, except additional clutter.
Abigail
In reply to Re: Use modules or roll your own?
by Abigail-II
in thread Use modules or roll your own?
by kvale
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |