logo       

Re: Design best practice : put state-independent methodsonclass side?: msg#00165

lang.smalltalk.squeak.beginners

Subject: Re: Design best practice : put state-independent methodsonclass side?

"Ramon Leon" <ramon.leon@xxxxxxxxxxxxx> 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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise