[ODE] ODE .NET Bindings Performance Issues, Unsafe code, etc...

Gonçalo Lopes goncaloclopes at gmail.com
Thu Oct 19 10:01:47 MST 2006


> >   * 'unsafe' code should be allowed in the lower-level wrapper to
> > account for efficiency and 1:1 mapping (unsafe is not really unsafe...
> > I prefer the managed C++ pragma keyword for it: "unmanaged")
> >
>
> I think that's a religious point. "unsafe" is unsafe, from the point of
> view that the code cannot be verified by the CLR runtime. Thus, it could
> also be called "untrusted" but that's longer to type :-)
>
> Cheers,

Religious or not, I think my example illustrated a valid use of
unsafe. I'd rather pass a pointer than making 2 complete copies of the
data structure, one to marshal in, the other to marshal out. I was not
being religious, I was just being pragmatic.

On 10/19/06, Jon Watte (ODE) <hplus-ode at mindcontrol.org> wrote:
>
>
> Gonçalo Lopes wrote:
> >   * 'unsafe' code should be allowed in the lower-level wrapper to
> > account for efficiency and 1:1 mapping (unsafe is not really unsafe...
> > I prefer the managed C++ pragma keyword for it: "unmanaged")
> >
>
> I think that's a religious point. "unsafe" is unsafe, from the point of
> view that the code cannot be verified by the CLR runtime. Thus, it could
> also be called "untrusted" but that's longer to type :-)
>
> Cheers,
>
>           / h+
>
>



More information about the ODE mailing list