> On 13 May 2015, at 17:57, Alain Rastoul <[email protected]> wrote: > > Le 13/05/2015 16:12, Sven Van Caekenberghe a écrit : >> I tried to abstract the Transcript API from the Pharo perspective in >> >> https://pharo.fogbugz.com/f/cases/15528/Add-TTranscript-and-DailyNonInteractiveTranscript >> >> If the Cuis Transcript implementation conformed to this, it could become >> just a plugin replacement/alternative, next to others already present. > > A Trait for the Transcript is very good idea. > > Just a question I had browsing the ThreadsafeTranscript implemntation, I > wonder why there is no accessor to instance variables (stream accessSemaphore > etc...). > I thought the smalltalk way was to always prefer accessors, under the private > protocol if private, but discourage direct access ?
Hmm, why ? I think it is more a question of (personal) style. Direct instance variable access without an accessor is a very good way to keep something private, it is faster as well. With the current tools, finding usages is very easy in both cases. IMO, an object should only implement the strict minimum of (public) messages, so not necessarily getters and setters for everything. Nothing is absolute though. > -- > Regards, > > Alain > >
