Le 8 nov. 2009 à 18:46, Niels Grewe a écrit :

> On Sat, Nov 07, 2009 at 12:41:34AM +0100, Quentin Mathé wrote:
>> Everything seems to be fine, except some tests failing on Mac OS X.
>
> I just fixed those. There were some problems due to the fact that in  
> OS
> X you will always get some mutable CF-bridged class for both
> NSDictionary and NSMutableDictionary.

ok, thanks.

>> I was just wondering whether -inverseFilter would be better named -
>> filterOut? I had some troubles to understand what 'inverseFilter'
>> means before I read the method documentation.
>> I'm not an English-native speaker though, may be -inverseFilter  
>> sounds
>> good and it's just me.
>
> -inverseFilter was never my first choice either, but it seems to be
> rather difficult to find a sound method name for it. (Eh, it might
> just be that I'm seriously creativity-impaired) In MPWFoundation
> the corresponding method is called -reject, which also struck me as
> odd.

MPW borrows most of its terminology from Smalltalk, so I suppose  
that's why it uses -reject as -select inverse operation. I find a bit  
hard to remember that -reject is the inverse operation that  
corresponds to -select though.

However it could be nice to have Smalltalk HOM variants built on top  
of -filter, -map etc. in addition to the Smalltalk block variants. I  
mean if we have:
aCollection filterWithBlock: [:each | each age > 16] // Étoilé generic  
idiom
aCollection filter age > 16 // Étoilé generic HOM idiom
aCollection select: [:each | each age > 16] // Smalltalk-specific idiom

we might want to support with the SmalltalkSupport framework or similar:

aCollection select age > 16 // Smalltalk-specific HOM idiom

I took these examples from an existing Smalltalk HOM implementation  
described here: 
http://www.cincomsmalltalk.com/publicRepository/HigherOrderMessaging.html

> Perhaps -filterOut can work. But how would you name the variant for
> immutable collections? Is -filteredOutCollection okay?

yes -filteredOutCollection.

> Maybe we should
> really leave this for a native speaker to decide...

Fully agreed. Is there a native speaker to comment on that? :-)

Cheers,
Quentin.
_______________________________________________
Etoile-dev mailing list
Etoile-dev@gna.org
https://mail.gna.org/listinfo/etoile-dev

Reply via email to