# C++ Exception compatibility idea

**URL:** <https://rubytalk.org/t/c-exception-compatibility-idea/11526>\
**Category:** ruby-talk\
**Created:** [13 May 2004 20:58 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526 "2004-05-13T20:58:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asfand\_Yar\_Qazi5](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@Asfand\_Yar\_Qazi5](https://rubytalk.org/u/Asfand_Yar_Qazi5)\
**Post date:** [13 May 2004 20:58 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/1 "2004-05-13T20:58:49Z")

</div>

Hi,

I have a dream… no, it doesn’t involve little black kids and  
little white kids, it involves Ruby (or some other scripting  
language) and C++.

I’d love it if a language supported a feature whereby a C++  
exception thrown in a C++ function is automatically processed and  
caught in an enclosing Ruby raise/rescue block, and a Ruby  
exception is caught and processed in a C++ try/catch block.

Obviously, I could create wrappers that do this at every language  
boundary (which is easy) but it would be cool if this was built  
into the interpreter, so it could be done without having to go  
through any hassle.

I read on the Ruby wiki that it is being considered that Rite be  
written (or Riten lol) in C++… could this be a neat little feature?

Thanks,  
Asfand Yar

> **···**
>
> –  
> [http://www.it-is-truth.org/](http://www.it-is-truth.org/)

---

<div class="post-metadata">

**Author:** ![HAL\_9000](https://avatars.discourse-cdn.com/v4/letter/h/90ced4/32.png) [@HAL\_9000](https://rubytalk.org/u/HAL_9000)\
**Post date:** [13 May 2004 21:14 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/2 "2004-05-13T21:14:37Z")

</div>

Asfand Yar Qazi wrote:

> I’d love it if a language supported a feature whereby a C++ exception  
> thrown in a C++ function is automatically processed and caught in an  
> enclosing Ruby raise/rescue block, and a Ruby exception is caught and  
> processed in a C++ try/catch block.
> 
> Obviously, I could create wrappers that do this at every language  
> boundary (which is easy) but it would be cool if this was built into the  
> interpreter, so it could be done without having to go through any hassle.
> 
> I read on the Ruby wiki that it is being considered that Rite be written  
> (or Riten lol) in C++… could this be a neat little feature?

I think this _might_ be accomplished with some kind of add-on wrapper  
lib for C extensions. My knowledge is limited there, so don’t take me  
too seriously.

As for implementing Rite in C++, I seem to remember Matz saying he would  
_not_ do such a thing. Where on the wiki did you see the comment?

Hal

---

<div class="post-metadata">

**Author:** ![Ptkwt](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Ptkwt](https://rubytalk.org/u/Ptkwt)\
**Post date:** [13 May 2004 23:23 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/3 "2004-05-13T23:23:51Z")

</div>

In article [40A3E539.2010204@hypermetrics.com](mailto:40A3E539.2010204@hypermetrics.com),

> Asfand Yar Qazi wrote:

> > I read on the Ruby wiki that it is being considered that Rite be written  
> > (or Riten lol) in C++… could this be a neat little feature?
> 
> As for implementing Rite in C++, I seem to remember Matz saying he would  
> _not_ do such a thing. Where on the wiki did you see the comment?

I’ve been thinking lately that it might be easier to do a Ruby  
implementation in Objective-C. Seems like it could make life a bit easier  
because Objective-C and Ruby have some things in common philosophically.  
Also you could take advantage of Obj-C’s collection classes where needed.  
Since Objective-C is just an add-on to C it probably wouldn’t be too hard  
to build on existing code. Also, Objective C is supported by GCC.

…of course, the downside on Windows is that the Microsoft compilers  
don’t support Objective C so all builds would have to be done under Cygwin  
or MinGW. That may be a problem for some. There wouldn’t be any problems  
on the Mac OSX platform, though 😉

Phil

> **···**
>
> Hal Fulton [hal9000@hypermetrics.com](mailto:hal9000@hypermetrics.com) wrote:

---

<div class="post-metadata">

**Author:** ![Matthias\_Georgi1](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@Matthias\_Georgi1](https://rubytalk.org/u/Matthias_Georgi1)\
**Post date:** [13 May 2004 23:52 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/4 "2004-05-13T23:52:50Z")

</div>

But you have to ship also the Objective-C runtime lib, so you have either  
the dependancy or it will blow up the interpreter in static builds.

Recently, I was looking into ocaml and was impressed by the type inference  
system, proving that c++ templating is the wrong way, also the  
pattern matching is a nice concept.  
And concerning speed, ocamlc is unbeatable.

Just for fun I looked at the great language shootout page  
and there is a nice score matrix.  
I typed in for CPU 1, Memory 2 and Lines of Code 3 as factors and voila,  
ocaml at the first two ranks and ruby at rank 5.

Finally it depends on matz’s language skills, impementing the  
interpeter is hard enough and I think, a reasonable fast implementation  
is possible in all of the common languages (non interpreted).

> **···**
>
> On Fri, 14 May 2004 08:23:51 +0900, Phil Tomson [ptkwt@aracnet.com](mailto:ptkwt@aracnet.com) wrote:
> 
> > I’ve been thinking lately that it might be easier to do a Ruby  
> > implementation in Objective-C. Seems like it could make life a bit  
> > easier  
> > because Objective-C and Ruby have some things in common philosophically.  
> > Also you could take advantage of Obj-C’s collection classes where needed.  
> > Since Objective-C is just an add-on to C it probably wouldn’t be too hard  
> > to build on existing code. Also, Objective C is supported by GCC.
> 
> –  
> Matthias Georgi  
> [matti\_g@gmx.de](mailto:matti_g@gmx.de)

---

<div class="post-metadata">

**Author:** ![Jim\_Freeze2](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@Jim\_Freeze2](https://rubytalk.org/u/Jim_Freeze2)\
**Post date:** [14 May 2004 02:29 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/5 "2004-05-14T02:29:30Z")

</div>

Matz has also said that you shouldn’t write an OO language in an OO  
language.

> **···**
>
> On Friday, 14 May 2004 at 8:23:51 +0900, Phil Tomson wrote:
> 
> > In article [40A3E539.2010204@hypermetrics.com](mailto:40A3E539.2010204@hypermetrics.com),
> > 
> > I’ve been thinking lately that it might be easier to do a Ruby  
> > implementation in Objective-C. Seems like it could make life a bit easier  
> > because Objective-C and Ruby have some things in common philosophically.  
> > Also you could take advantage of Obj-C’s collection classes where needed.  
> > Since Objective-C is just an add-on to C it probably wouldn’t be too hard  
> > to build on existing code. Also, Objective C is supported by GCC.
> 
> –  
> Jim Freeze  
> The man who follows the crowd will usually get no further than the  
> crowd. The man who walks alone is likely to find himself in places no  
> one has ever been.  
> – Alan Ashley-Pitt

---

<div class="post-metadata">

**Author:** ![James\_F\_Hranicky](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@James\_F\_Hranicky](https://rubytalk.org/u/James_F_Hranicky)\
**Post date:** [14 May 2004 10:44 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/6 "2004-05-14T10:44:04Z")

</div>

I brought this up a long time ago, but I don’t know if I brought it up well.

I think it would be great if Ruby could be used as a frontend for the ObjC  
runtime for GNUstep or OSX. Ruby Objects are just handles for ObjC objects.

Ideally, any extension written in ObjC would automatically be available in  
Ruby.

Feasible? I have no idea, but if it is, it seems like you could get just about  
all the features desired out of such a backend, since they’re already there in  
the ObjC runtime.

Jim

> **···**
>
> On Fri, 14 May 2004 08:23:51 +0900 [ptkwt@aracnet.com](mailto:ptkwt@aracnet.com) (Phil Tomson) wrote:
> 
> > I’ve been thinking lately that it might be easier to do a Ruby  
> > implementation in Objective-C. Seems like it could make life a bit easier  
> > because Objective-C and Ruby have some things in common philosophically.  
> > Also you could take advantage of Obj-C’s collection classes where needed.  
> > Since Objective-C is just an add-on to C it probably wouldn’t be too hard  
> > to build on existing code. Also, Objective C is supported by GCC.

---

<div class="post-metadata">

**Author:** ![Stephen\_Steiner](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@Stephen\_Steiner](https://rubytalk.org/u/Stephen_Steiner)\
**Post date:** [14 May 2004 00:14 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/7 "2004-05-14T00:14:33Z")

</div>

I’m trying to install Ruby’s readline module on OS X and am having the  
following problem:

When I run:

ruby extconf.rb

I get:

checking for tgetnum() in -lncurses… yes  
checking for readline/readline.h… yes  
checking for readline/history.h… yes  
checking for readline() in -lreadline… no

The question is, where are the paths that ‘have\_library()’ is going to  
search? It is finding the header files but can’t seem to find the  
library (libreadline.a).

Thanks!

Steve

---

<div class="post-metadata">

**Author:** ![jm13](https://avatars.discourse-cdn.com/v4/letter/j/5fc32e/32.png) [@jm13](https://rubytalk.org/u/jm13)\
**Post date:** [14 May 2004 02:53 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/8 "2004-05-14T02:53:33Z")

</div>

Why not cut out the middle man and write a gcc compiler for ruby? Just  
to throw a crazy idea around.

J.  
ps. like the sig.

> **···**
>
> On 14/05/2004, at 12:29 PM, Jim Freeze wrote:
> 
> > On Friday, 14 May 2004 at 8:23:51 +0900, Phil Tomson wrote:
> > 
> > > In article [40A3E539.2010204@hypermetrics.com](mailto:40A3E539.2010204@hypermetrics.com),
> > > 
> > > I’ve been thinking lately that it might be easier to do a Ruby  
> > > implementation in Objective-C. Seems like it could make life a bit  
> > > easier  
> > > because Objective-C and Ruby have some things in common  
> > > philosophically.  
> > > Also you could take advantage of Obj-C’s collection classes where  
> > > needed.  
> > > Since Objective-C is just an add-on to C it probably wouldn’t be too  
> > > hard  
> > > to build on existing code. Also, Objective C is supported by GCC.
> > 
> > Matz has also said that you shouldn’t write an OO language in an OO  
> > language.
> > 
> > –  
> > Jim Freeze  
> > The man who follows the crowd will usually get no further than the  
> > crowd. The man who walks alone is likely to find himself in places no  
> > one has ever been.  
> > – Alan Ashley-Pitt

---

<div class="post-metadata">

**Author:** ![Michael\_Campbell1](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Michael\_Campbell1](https://rubytalk.org/u/Michael_Campbell1)\
**Post date:** [14 May 2004 03:20 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/9 "2004-05-14T03:20:07Z")

</div>

Jim Freeze wrote:

> Matz has also said that you shouldn’t write an OO language in an OO  
> language.

Why not?

---

<div class="post-metadata">

**Author:** ![Sam\_Roberts](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sam\_Roberts](https://rubytalk.org/u/Sam_Roberts)\
**Post date:** [14 May 2004 12:46 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/10 "2004-05-14T12:46:14Z")

</div>

Wrote “James F. Hranicky” [jfh@cise.ufl.edu](mailto:jfh@cise.ufl.edu), on Fri, May 14, 2004 at 07:44:04PM +0900:

> **···**
>
> > On Fri, 14 May 2004 08:23:51 +0900 \> [ptkwt@aracnet.com](mailto:ptkwt@aracnet.com) (Phil Tomson) wrote:  
> > I brought this up a long time ago, but I don’t know if I brought it up well.
> > 
> > I think it would be great if Ruby could be used as a frontend for the ObjC  
> > runtime for GNUstep or OSX. Ruby Objects are just handles for ObjC objects.
> 
> Check out Ruby/cocoa, it sounds like what you want.
> 
> Sam
> 
> –  
> Sam Roberts [sroberts@certicom.com](mailto:sroberts@certicom.com)

---

<div class="post-metadata">

**Author:** ![Aredridel1](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@Aredridel1](https://rubytalk.org/u/Aredridel1)\
**Post date:** [14 May 2004 15:27 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/11 "2004-05-14T15:27:40Z")

</div>

> I brought this up a long time ago, but I don’t know if I brought it up well.
> 
> I think it would be great if Ruby could be used as a frontend for the ObjC  
> runtime for GNUstep or OSX. Ruby Objects are just handles for ObjC objects.
> 
> Ideally, any extension written in ObjC would automatically be available in  
> Ruby.

Have you tried RIGS or ruby-cocoa?

Ari

---

<div class="post-metadata">

**Author:** ![Shu-yu\_Guo1](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@Shu-yu\_Guo1](https://rubytalk.org/u/Shu-yu_Guo1)\
**Post date:** [14 May 2004 00:27 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/12 "2004-05-14T00:27:02Z")

</div>

It looks like that it adds CONFIG[‘libdir’] to -L.

As a sidenote, perhaps it would be easier if you used a ports system to  
compile your Unix stuff, like DawrinPorts. It saves me a good deal of  
trouble.

> **···**
>
> On May 13, 2004, at 20:14, Stephen Steiner wrote:
> 
> > The question is, where are the paths that ‘have\_library()’ is going to  
> > search? It is finding the header files but can’t seem to find the  
> > library (libreadline.a).
> 
> –  
> Lo-lee-ta: the tip of the tongue taking a trip of three  
> steps down the palate to tap, at three, on the teeth.  
> Lo. Lee. Ta. GUO Shu-yu [shu@rufuran.org](mailto:shu@rufuran.org)

---

<div class="post-metadata">

**Author:** ![Mark\_Hubbart](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@Mark\_Hubbart](https://rubytalk.org/u/Mark_Hubbart)\
**Post date:** [14 May 2004 02:41 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/13 "2004-05-14T02:41:32Z")

</div>

Have you installed a copy of readline on your system? There are two  
possibilities here:

1. make and install a readline library, or
2. if you were lucky enough to have a copy installed with your  
developer tools, link it to your /usr/lib directory.

If a copy was installed, it should be under  
“/System/Library/PrivateFrameworks/readline.framework/”; If it’s not  
there, you’ll probably have to compile a copy.

Since it was installed on mine, I haven’t had to compile it. But I hear  
that other people’s setups don’t have it, so I don’t know.

HTH,  
–Mark

> **···**
>
> On May 13, 2004, at 5:14 PM, Stephen Steiner wrote:
> 
> > I’m trying to install Ruby’s readline module on OS X and am having the  
> > following problem:
> > 
> > When I run:
> > 
> > ruby extconf.rb
> > 
> > I get:
> > 
> > checking for tgetnum() in -lncurses… yes  
> > checking for readline/readline.h… yes  
> > checking for readline/history.h… yes  
> > checking for readline() in -lreadline… no
> > 
> > The question is, where are the paths that ‘have\_library()’ is going to  
> > search? It is finding the header files but can’t seem to find the  
> > library (libreadline.a).

---

<div class="post-metadata">

**Author:** ![HAL\_9000](https://avatars.discourse-cdn.com/v4/letter/h/90ced4/32.png) [@HAL\_9000](https://rubytalk.org/u/HAL_9000)\
**Post date:** [14 May 2004 03:23 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/14 "2004-05-14T03:23:43Z")

</div>

Michael campbell wrote:

> Jim Freeze wrote:
> 
> > Matz has also said that you shouldn’t write an OO language in an OO  
> > language.
> 
> Why not?

I think it had something to do with the mismatch between the languages.  
Confusion between Ruby objects and C++ objects (which work differently)  
and all that.

Easier to describe an OO language like Ruby procedurally. But IANYM.

Hal

---

<div class="post-metadata">

**Author:** ![James\_F\_Hranicky](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@James\_F\_Hranicky](https://rubytalk.org/u/James_F_Hranicky)\
**Post date:** [14 May 2004 15:34 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/15 "2004-05-14T15:34:58Z")

</div>

No, but those don’t affect the way the backend runs, right? I’m thinking  
that a pure ObjC backend would support native threads and be relatively fast,  
things desired out of Rite.

I could be talking out of something other than my mouth, but I’d like to see  
someone who knows what their talking about give an informed opinion :-\>

Jim

> **···**
>
> On Sat, 15 May 2004 00:27:40 +0900 Aredridel [aredridel@nbtsc.org](mailto:aredridel@nbtsc.org) wrote:
> 
> > > I brought this up a long time ago, but I don’t know if I brought it up well.
> > > 
> > > I think it would be great if Ruby could be used as a frontend for the ObjC  
> > > runtime for GNUstep or OSX. Ruby Objects are just handles for ObjC objects.
> > > 
> > > Ideally, any extension written in ObjC would automatically be available in  
> > > Ruby.
> > 
> > Have you tried RIGS or ruby-cocoa?

---

<div class="post-metadata">

**Author:** ![Ptkwt](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Ptkwt](https://rubytalk.org/u/Ptkwt)\
**Post date:** [14 May 2004 18:38 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/16 "2004-05-14T18:38:52Z")

</div>

In article [40A431B3.9060504@yahoo.com](mailto:40A431B3.9060504@yahoo.com),

> **···**
>
> Michael campbell [michael\_s\_campbell@yahoo.com](mailto:michael_s_campbell@yahoo.com) wrote:
> 
> > Jim Freeze wrote:
> > 
> > > Matz has also said that you shouldn’t write an OO language in an OO  
> > > language.
> > 
> > Why not?
> 
> Maybe because the differences between the two object systems can get to be  
> confusing as you’re trying to implement a different object system on top  
> of another one. Maybe the implementation language’s object system would  
> have too much influence at a subconcious level.
> 
> I can kind of see his point.
> 
> Phil

---

<div class="post-metadata">

**Author:** ![Nicholas\_Van\_Weerden](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@Nicholas\_Van\_Weerden](https://rubytalk.org/u/Nicholas_Van_Weerden)\
**Post date:** [17 May 2004 02:56 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/17 "2004-05-17T02:56:37Z")

</div>

I downloaded a precompiled bundle from a web site and dropped it into my  
ruby lib according to instructions.

I downloaded it from the site mentioned here:  
[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/72433](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/72433)

I also tried building it according to a script in this email. The script  
was pretty cool, but didn’t work for me, so I just downloaded the bundle  
and followed the instructions. It’s worked great for me.

Nick

Stephen Steiner wrote:

> **···**
>
> > I’m trying to install Ruby’s readline module on OS X and am having the  
> > following problem:
> > 
> > When I run:
> > 
> > ruby extconf.rb
> > 
> > I get:
> > 
> > checking for tgetnum() in -lncurses… yes  
> > checking for readline/readline.h… yes  
> > checking for readline/history.h… yes  
> > checking for readline() in -lreadline… no
> > 
> > The question is, where are the paths that ‘have\_library()’ is going to  
> > search? It is finding the header files but can’t seem to find the  
> > library (libreadline.a).
> > 
> > Thanks!
> > 
> > Steve

---

<div class="post-metadata">

**Author:** ![Stephen\_Steiner](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@Stephen\_Steiner](https://rubytalk.org/u/Stephen_Steiner)\
**Post date:** [14 May 2004 01:31 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/18 "2004-05-14T01:31:12Z")

</div>

Unfortunately, I often need the most recent builds of things and they  
are not usually supported by the DarwinPorts as far as I can tell.

For example, I wanted to replace the Apple supplied Ruby with 1.8.1 but  
I wanted the ‘stable-snapshot’ instead of the release version. As far  
as I know, that would not be available using DarwinPorts.

Steve

> **···**
>
> On May 13, 2004, at 8:27 PM, Shu-yu Guo wrote:
> 
> > On May 13, 2004, at 20:14, Stephen Steiner wrote:
> > 
> > > The question is, where are the paths that ‘have\_library()’ is going  
> > > to search? It is finding the header files but can’t seem to find the  
> > > library (libreadline.a).
> > 
> > It looks like that it adds CONFIG[‘libdir’] to -L.
> > 
> > ## As a sidenote, perhaps it would be easier if you used a ports system to compile your Unix stuff, like DawrinPorts. It saves me a good deal of trouble.
> > 
> > Lo-lee-ta: the tip of the tongue taking a trip of three  
> > steps down the palate to tap, at three, on the teeth.  
> > Lo. Lee. Ta. GUO Shu-yu [shu@rufuran.org](mailto:shu@rufuran.org)

---

<div class="post-metadata">

**Author:** ![Ara.T.Howard](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Ara.T.Howard](https://rubytalk.org/u/Ara.T.Howard)\
**Post date:** [14 May 2004 03:53 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/19 "2004-05-14T03:53:49Z")

</div>

‘IANYM’.gsub /.\*/, ??

-a

> **···**
>
> On Fri, 14 May 2004, Hal Fulton wrote:
> 
> > Michael campbell wrote:
> > 
> > > Jim Freeze wrote:
> > > 
> > > > Matz has also said that you shouldn’t write an OO language in an OO  
> > > > language.
> > > 
> > > Why not?
> > 
> > I think it had something to do with the mismatch between the languages.  
> > Confusion between Ruby objects and C++ objects (which work differently)  
> > and all that.
> > 
> > Easier to describe an OO language like Ruby procedurally. But IANYM.
> 
> # –
> 
> > EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov  
> > PHONE :: 303.497.6469  
> > ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328  
> > URL :: [Solar-Terrestrial Physics Data | NCEI](http://www.ngdc.noaa.gov/stp/)  
> > TRY :: for l in ruby perl;do $l -e “print "\x3a\x2d\x29\x0a"”;done  
> > ===============================================================================

---

<div class="post-metadata">

**Author:** ![Aredridel1](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@Aredridel1](https://rubytalk.org/u/Aredridel1)\
**Post date:** [14 May 2004 15:51 UTC](https://rubytalk.org/t/c-exception-compatibility-idea/11526/20 "2004-05-14T15:51:48Z")

</div>

> > Have you tried RIGS or ruby-cocoa?
> 
> No, but those don’t affect the way the backend runs, right? I’m thinking  
> that a pure ObjC backend would support native threads and be relatively fast,  
> things desired out of Rite.

Well, things written in ObjC appear as Ruby classes – it becomes a  
second backend of sorts.

Ruby code is still run by the C interpeter, but it can call ObjC  
classes.

> I could be talking out of something other than my mouth, but I’d like to see  
> someone who knows what their talking about give an informed opinion :-\>

Rite or another implementation -could- be written in ObjC, and I’d love  
to see it happen. Portability to Windows is an issue, but I’m content  
there.

There are some things in Ruby that don’t map to ObjC, so a backend that  
simply compiled Ruby to ObjC can’t happen: things like eval would have  
to invoke the compiler, and Ruby allows a few things (like adding member  
variables to classes at any time) that ObjC doesn’t.

Ari

[Next page](https://rubytalk.org/t/c-exception-compatibility-idea/11526.md?page=2)
