[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Higher Order Messaging (MPWFoundation, ...)

From: Quentin Mathé
Subject: Re: Higher Order Messaging (MPWFoundation, ...)
Date: Wed, 12 Aug 2009 02:03:59 +0200

Le 11 août 09 à 13:32, David Chisnall a écrit :

On 11 Aug 2009, at 12:11, Lucas Schnorr wrote:

There is also this post in the Étoilé site:
It presents the implementation of HOM in EtoileFoundation. Is it
possible to use it
with other applications?

This implementation (some really nice code by Niels Grewe, removing something that had been on my TODO list for a couple of years) is part of the EtoileFoundation framework. This has no dependencies other than an OpenStep implementation and has been tested on both GNUstep and OS X. I think there's an XCode project for OS X (I've never used it, but I think Quentin's tested it on OS X and fixed some issues there) and a GNUmakefile.

You can find the Xcode project here: 
However you need to check the parent directory Etoile/Frameworks which contains both EtoileFoundation and EtoileUI. Currently we don't have a standalone Xcode project in EtoileFoundation, although it is on my TODO list to split the big Xcode project located in the EtoileUI directory. The HOM support pass all the tests on both GNUstep and Mac OS X 10.5, so it should work well on Mac OS X. You'll need UnitKit to run the EtoileFoundation test suite. UnitKit is available here: http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Frameworks/UnitKit/

Here is quick comparison between MPW and Étoilé HOM, I don't pretend to be objective since I'm involved in Étoilé. :-) MPW HOM is more complete than Étoilé HOM. We have no equivalent to - foreach or -selectWhere. We have -filter as a -select equivalent though, so a -filterWhere shouldn't be hard to implement. Niels Grewe seems to be interested to add it, so this might be available in the near future. -foreach is more complex to support. MPW HOM also includes various optimization tricks that makesit faster than Étoilé implementation I think. Étoilé HOM is a smaller than MPW HOM and easier to understand and extend imo. Any collection that implements ETCollection and/or ETCollectionMutation protocols will also benefit from HOM for free. The API also makes easy to customize how HOM interacts per collection type. e.g. Niels made NSCountedSet and NSMutableIndexSet HOM-compatible. Finally as David outlined, the same code base also supports Smalltalk- like collection methods that take blocks as argument.

It is closely tied to the ETCollection protocol, which is added via a category to all of the standard OpenStep collection classes giving a consistent interface (which is used by CoreObject and EtoileUI).

It should possible to extract the HOM support from EtoileFoundation relatively easily, if you are not interested in the other classes and you just want to embed the HOM code in your own project.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]