[Mono-list] binding

bob@leary.csoft.net bob@leary.csoft.net
Tue, 10 Jul 2001 18:23:07 -0400 (EDT)

Well, the standard C functions are portable enough to any C supporting
platform (alot more platforms then C# at the moment) and the C standard
math lib is alot better tested as well. So, it should be just as portable.
The question is, Do we want the class libs we are writing to be able to
run outside of mono, so that they run on Microsofts .NET (they already
have those libs, so it seems alittle silly) and other .NETalikes? If we
do, then we shouldnt bind anything and use pure C#.

On Tue, 10 Jul 2001, Stefan Arentz wrote:

> On Tue, Jul 10, 2001 at 01:25:33PM -0600, Bob Smith wrote:
> > I'm looking at implementing the Math class and I was wondering would it
> > be better to implement it from scratch in C#, or bind it to standard C
> > math functions. Each way is just as portable as the other, both I think
> > will be just about the same performance, the C binding requires less
> > work, and the C# way would probably be cleaner. What is the general
> > consensus about binding vs codeing when it comes to making use of
> > standard C libs?
> Compiled C code has dependencies to support libraries. Bytecode can be
> run immediately on any platform.
> If speed is a problem, it's probably possible to do both a bytecode
> and native version, and let the runtime decide which one to use?
>  Stefan