Re: [Pharo-dev] what is newFrom:

2020-07-23 Thread Reg Krock via Pharo-dev
--- Begin Message --- I have seen #newFrom: in many places while working Smalltalk. I have never assumed it would be a ‘similar’ object. Also, what is the meaning of ‘similar’? Since all objects have same ancestor, Object, one could argue any returned object is similar. Regards, Reg Sent

Re: [Pharo-dev] what is newFrom:

2020-07-23 Thread Sean P. DeNigris
Stéphane Ducasse wrote > I’m spotting real inconsistency in the specification and use of newFrom: I recently thought something similar when working with ArrayedCollection. As you say, here is yet another inconsistency because it doesn't return a "similar object", but just copies the elements of

[Pharo-dev] what is newFrom:

2020-07-21 Thread Stéphane Ducasse
Hi I’m spotting real inconsistency in the specification and use of newFrom: In Pharo and Object we have newFrom: aSimilarObject "Create an object that has similar contents to aSimilarObject. If the classes have any instance variables with the same names, copy them across. If this