Re: [Pharo-dev] basicNew usage pattern

2017-05-30 Thread Ben Coman
Thanks for the additional perspective Guille. Now reading back I see that I was not explicit. I was proposing the following changes might be preferred... Example1 -- DAPackageRelationGraph>>addMessageSendDependencies: aPackage analyser := DAMessageSendAnalyzer newWith: aPackage; yourself.

Re: [Pharo-dev] basicNew usage pattern

2017-05-30 Thread Guillermo Polito
Hi Ben, Just to complete Sven's answer: #new will send #initialize to the new instance. Some frameworks may not want that to avoid extra initializations or side-effects. Think for example about any kind of serializer like Fuel or Glorp: the object they serialize/deserialize already have state,

Re: [Pharo-dev] basicNew usage pattern

2017-05-30 Thread Ben Coman
On Tue, May 30, 2017 at 2:05 PM, K K Subbu wrote: > On Sunday 28 May 2017 02:09 PM, Ben Coman wrote: > >> Thanks Subbu. That is a useful insight for me, but is about the >> implementation. >> My query was more about senders of basicNew, so is still open if you >> have an

Re: [Pharo-dev] basicNew usage pattern

2017-05-30 Thread K K Subbu
On Sunday 28 May 2017 02:09 PM, Ben Coman wrote: Thanks Subbu. That is a useful insight for me, but is about the implementation. My query was more about senders of basicNew, so is still open if you have an opinion there, or anyone else. It is just a private primitive for creating new

Re: [Pharo-dev] basicNew usage pattern

2017-05-28 Thread Sven Van Caekenberghe
> On 28 May 2017, at 10:39, Ben Coman wrote: > > On Sat, May 27, 2017 at 5:41 PM, K K Subbu wrote: >> On Saturday 27 May 2017 01:41 PM, Ben Coman wrote: >>> >>> A question arose in Discord regarding #basicNew, to which I felt like >>> the proper

Re: [Pharo-dev] basicNew usage pattern

2017-05-28 Thread Ben Coman
On Sat, May 27, 2017 at 5:41 PM, K K Subbu wrote: > On Saturday 27 May 2017 01:41 PM, Ben Coman wrote: >> >> A question arose in Discord regarding #basicNew, to which I felt like >> the proper answer should be >> that #basicNew is used only** from the class-side when making

Re: [Pharo-dev] basicNew usage pattern

2017-05-27 Thread K K Subbu
On Saturday 27 May 2017 01:41 PM, Ben Coman wrote: A question arose in Discord regarding #basicNew, to which I felt like the proper answer should be that #basicNew is used only** from the class-side when making custom initializers. (**excepting special meta-handling like by Behaviour) AFAIK,