[Cuis-dev] Voiceless regarding behavior of statePointsTo:
Juan Vuletich
juan at cuis.st
Mon Jul 3 05:28:33 PDT 2023
On 7/3/2023 4:31 AM, Hilaire Fernandes via Cuis-dev wrote:
> Le 01/07/2023 à 20:34, Juan Vuletich a écrit :
>> That is a bit more expensive than needed, because of the creation of
>> a collection. Moreover, I wonder, why do you need this?
>
> Do you think of a cheaper alternative? I can only think of two passes
> loop over the attributes to count the object in collection
>
> Hilaire
>
If you're just looking for a parent object (as you mentioned in another
email), you don't need to build the collection at all. See
#firstOwnerSuchThat: that ends doing #withAllOwnersDo: . This is how we
do that kind of search in Morphic.
Also see that we don't use a generic "do you refer to this object"
message, but messages that specifically talk about the owner, making the
intent clear.
Hope this helps.
Cheers,
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
More information about the Cuis-dev
mailing list