[Mono-list] RE: Mono-list digest, Vol 1 #6 - 20 msgs

Bob Smith bob@thestuff.net
Tue, 10 Jul 2001 19:00:23 -0400 (EDT)


I'm leaning towards doing it as a C binding as well.

On a side note, anyone know where I can get VS.NET beta without paying
Microsoft an arm and a leg for their MSDN subscription?

On Tue, 10 Jul 2001, Michael  Lambert wrote:

>
>
> > -----Original Message-----
> > From: Stefan Arentz [mailto:stefan.arentz@soze.com]
> > > > From: Bob Smith <bob@thestuff.net>
> > > > Subject: [Mono-list] binding
> > > >
> > > > 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?
> > > >
> > > Bind it to standard C (My vote).
> >
> > That defeats one of the great features of an interpreted (jit-compiled)
> > system; portability.
> >
>
> Obviously, functions like System.Math.Min can be done in IL. Unfortunately,
> not everything will be.  Take this example from .Net from System.Math
>
> .method public hidebysig static float64  Cos(float64 d) cil managed
> internalcall
> {
> } // end of method Math::Cos
>
> Now load up MSVCR70.DLL in the Dependency Walker and look at ordinal 61
> (0x03D): _CIcos
>
> My vote was for the standard C libraries in this case.  Feel free to post
> your alternative.
>
> Michael
>
>
>
>
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>