[Newbies] Re: Design best practice : put state-independent methodsonclass side?

itsme213 itsme213 at hotmail.com
Tue Mar 25 22:51:44 UTC 2008


"Ramon Leon" <ramon.leon at allresnet.com> wrote

> Like a class?  Classes are singletons, what do you have against using them
> as such?

That's my feeling too, in general.

Is my specific usage style OK -- many instance methods from many classes 
calling shared state-less methods from a common class? Or does it have some 
kind of code smell? Any thought on whether traits (simply mixing them in on 
the instance side) would be a preferred approach to this?

Foo>>m1
  Library doX: iVar1 with: iVar2

Foo>>m2
  Library doZ: iVar2

Bar>>m3
  Library doX: iVar7 with: ivar8

Library class>>doX: anX with: aY

Library class>>doZ: aZ

- Sophie 





More information about the Beginners mailing list