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

Using old C++ libraries with Dylan



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?

Thanks,
Mark.






Follow-Ups: