Alexander Schofield wrote:

> Objective-C is a great language, and there are optional garbage
> collectors you can use.  But if you just want some extra speed, why not
> just write the parts that need it in C?  It's just that Objective-C is a
> nice small OO system around C, useful for organizing C code, unlike C++
> which adds a whole raft of other stuff.  Ruby code written in C looks a
> lot like normal Ruby, and Ruby's OO system serves essentially the same

I had a look at: http://www.rubycentral.com/book/ext_ruby.html
It does indeed look a lot like normal Ruby :-)

But I still think Objective-C or Sather would be even better for this. This
is Rubyfied C code:

rb_ary_push(arr, anObject);

It would be much more 'natural' when mapped on a 'real' object model:

[arr push:anObject];     (Objective C)
arr.push(anObject);    (Sather)

Sather has a lot in common with Ruby, if you'd map Ruby's runtime and
standard libraries on Sather, you can even use the methods which support
iterators as well:

http://www.gnu.org/software/sather/Doc/tutorial.html/iterators873.html

That way Ruby programmers would immediately feel at home. AFAIK GNU/Sather
uses the gcc as a backend, so Rubyfied Sather should be ideal for compiling
libraries/low level stuff that would be sub-optimal in Ruby itself.

 Erik.