On Tue, May 15, 2012 at 11:56 AM, Jonathan S. Shapiro <[email protected]>wrote:
> Concerning strong typing, I would really like to see an example where an > unsafe escape is required. I know of exactly two such places: > > - In an operating system kernel, where pointers corresponding to > hardware-defined well-known addresses must be declared. > - In *very* low-level runtime implementations, like the inside of the > storage allocator. Actually, I'm not convinced that unsafe code is required > there. > > Every other use of unsafe code that I have seen exists to correct a > deficiency of the language design, most commonly in the area of arrays vs. > vectors or in the area of low-level I/O. There are known strongly-typed > solutions for both cases. > - Implementing thunks to primitive shared-libraries or kernel calls .... I much prefer the PInvoke/unsafe model over having to code all of these things in external unsafe languages.
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
