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

Re: Functional Developer UNICODE support + source?



On Wednesday, July 25, 2001, at 12:30  pm, Mark Jordan wrote:

> I'd ask for the rules, but the complex job of writing Dylan CFFI's and
> no unicode has put me off using Dylan at all. What I really need is
> a CPPFFI to interface to existing C++ class libraries.  Any ideas on
> how this might be done?

C++ compiler manufacturers would need to agree on common name mangling, 
vtable layout and exception handling conventions and they'd then all 
need to implement them. This would allow C++ code compiled with 
different versions of the same compiler, or C++ compilers from different 
vendors, to call C++ code that isn't statically compiled into the same 
compilation unit. It would then be relatively trivial to allow other 
languages to join the party.
Gwydion Dylan was used on BeOS to call the BeOS C++ frameworks through C 
wrappers. This really is the only non-COM, non-magic way of calling C++ 
code from *any* language.

Gwydion Dylan has Unicode support and a utility that parses C header 
files and generates Dylan wrappers (well, its own C-FFI, but 
Fun-Dev-style C-FFI support is coming). I've written Dylan C wrappers 
for the Mac Toolbox in GD by hand. It's doable (but a header parser is 
more fun :-) ).

- Rob.

--
"The idea behind Dylan—to offer a range of dynamism appropriate to each 
piece of an application—feels right, and after using Dylan you will 
become frustrated with C++ and Java."
- Peter Norvig, Software Developer Magazine.


Follow-Ups: References: