[Mono-list] Pure C# vs. PInvoke

Bob Salita bsalita@hotmail.com
Wed, 18 Jul 2001 10:32:10 -0500


IMHO, this is goodness. Although separate from the data type thunking issue.

Bob.

>I did a lot of thinking lately about the pure C# way of coding versus the
>PInvoke way. So I have a new proposal :
>
>1. A naming convention for files to differentiate pure C# (thus working
>everywhere there's a CLR) from "native" C# (thus platform dependant): (P |
>N)[.OSName.OSVersion].ItemName.cs
>A pure C# "Whatever" class would then be called P.Whatever.cs, and this 
>same
>class binding to a 2.4 Linux version would be called
>N.Linux.2.4.Whatever.cs.
>That way, when a new CLR on a new platform appears, it will be very simple
>to use the Pure C# classes when available, and to create an optimized bind
>version later. What do you think? Let's take for example Winforms. If
>someone decides to implement the System.Windows.Forms namespace using only
>the System.Drawing, then if a new CLR appears on BeOS, it will first bind
>System.Drawing, thus get full WinForms support very fast (although a bit
>slow), and could then spend some time binding WinForms to BeOs Widgets...

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com