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

Re: Using old C++ libraries with Dylan



On Wed, 12 Sep 2001 14:00:01 -0400 (EDT), "Mark Jordan"
<Mark_Jordan@nospam.btinternet.com> wrote:

> Hi,
> Here's my problem. I like Dylan and want to use it,
> but I have a huge investment in C++ libraries that
> I want to retain.
> 
> I can repackage package those libraries so that they
> are C-callable, which makes them Dylan callable, however
> there's one issue which is putting a spanner in the
> works, and that is exception handling.
> 
> Many of my libraries throw exceptions which as far
> as I'm aware could never be caught in Dylan code.
> 
> I could change my top-level library functions to return
> error codes but that's not so good because the function
> might already be using the return value for something else.
> 
> There's also the issue of granularity. Some of my libraries
> are fine-grained, which will result in too much overhead if
> I make them C-callable.
> 
> My ideal solution would be to somehow be able to catch
> any exceptions thrown by the C++ code in Dylan, but I
> don't know if it's technically possible.
> 
> Any suggestions as to what to do?

You could try using COM or CORBA. CORBA has cross language exception handling,
but at the moment for the Dylan ORB this sounds like it would be too costly
for your fine grained calls because there would be some extra network
marshalling. I don't know about COM? Does it provide for exception handling in
any way?

__Jason


Follow-Ups: References: