Win32 vs .Net

.net, c++, winapi, windows

Solution

These are all from my POV. Your mileage may vary.

Advantages of .NET:

- Cross platform capability (via Mono and .Net Core)

- Good selection of framework classes typically means less code.

- Easy integration of components, regardless of the language the component was coded in. (You like F#, or IronPython, great! Code your assemblies in whichever language is most appropriate.)

Disadvantages of .NET:

- .NET means different things to different people. (For example where does WPF come into the equation?)

- Sometimes DLLImport and/or PInvoke is the only way to get to the functionality you need, which means you lose the cross-platform capability.

Advantages of WIN32:

- If you know what you are doing, you can construct great applications with minimal dependencies.

- More suitable for "low level" operations than a .NET based solution.

Disadvantages of WIN32:

- If you don't know what you're doing, you can easily shoot yourself in the foot in a more application or system fatal manner.

- You frequently have to write code that you would get "for free" using .NET.

Both have their place, and will probably continue to exist until a true replacement OS (Midori? Some form of web-based OS?) comes online and gains widespread acceptance.

Problem

Is .NET better than Win32 or the othe way around? Which would be the pros \ cons of both, in what situations one would be better than the other. Has Microsoft released .Net as a replacement for Win32? I am not asking about the amount of projects needed to be maintained, but about new projects being developed, and which would be better for what. Do you think .Net lacks important stuff from win32 (without using dllImport )? And do you think Win32 will be replaced by .Net I am asking this, because i am having an argument with a friend of mine, and as we both agree both must be studied in depth My friend argues that .Net is incomplete, and i say that it can manage almost any task non-driver related. Where does .Net fail?

Original source