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 from my iPhone
On Jul 23, 2020, at 10:09 AM, Sean P. DeNigris <sean@clipperadams.com> wrote:
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 the collection argument into an instance of itself with the same size. There is also ArrayedCollection class >> #withAll: which seems to do the same, but neither delegates to the other and they have different implementations.
----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html