On Wed, 13 Jun 2001, Laurent Julliard wrote: > If I understand what you said you'd like to "rewrite" NSMutableString, > NSMutableArray, and NSMutableDictionary in Ruby right? Why is it better > to do that rather than simply map the GNUStep objects in Ruby? No... those three classes are actually "class clusters" - the superclasses are abstract and implement everything but a few primitives; there are private subclasses that implement the primitives and actually get instantiated (which particular subclass gets used at any time is usually decided internally by the framework). I was suggesting that we write subclasses of these, in Objective-C, that implement the necessary primitives through operations on the equivalent Ruby objects - this would allow pretty transparent passing back and forth between the two frameworks. However, that doesn't work for immediate values (which need to be converted between the Ruby types and the C types, not a big deal), or for other classes (which would need some kind of a forwarding proxy object; I have that working calling Obj-C from Ruby, but not the other way around yet). As a sort of side issue that intrigues me somewhat - an object in Objective-C is simply a struct with an "isa" pointer to its Class as the first field. I'm curious what could be done by modifying ruby.h to include such a field in all objects, so that a ruby VALUE pointer can be cast directly to an Objective-C object. > PS: Do you have some code that we could share now? Not much of it. You can look at http://beta4.com/~avi/cupertino.tgz You'll probably have to tweak the GNUMakefile to get it to build on your system.