Don Box on James Gosling on .NET and Java
Go read.
Re: Don Box on James Gosling on .NET and Java
I liked Don's explanation better than Gosling's comment. Prior to this, I thought the C# unsafe code feature are the moral equivalent of JNI, and I was sure Gosling was wrong.
Don's explanation actually moved me towards Gosling's argument, at least theoretically.
I don't know how much of this debate can translate into practice. In Java, you can say "if you load native libraries, the all security bets are off." Can you say "in C#, if you write unsafe code, all security bets are off?"
From another angle, say I actually wrote a line of unsafe code in C# that, if written in C, is exploitable. Does that mean the code is exploitable in C#? Is this more bad, as bad or less bad as writing an equivalent piece of JNI code in Java?
There is a lengthy debate about this going on at TheServerSide.com right now.