Hello, So I am using microsoft visual C++ 2010 and I was wondering is there a way to avoid using .NET implementations? If so, what would I need to do and what are the drawbacks.


Thanks

Recommended Answers

All 5 Replies

I find it easy to avoid .NET because I don't see any purpose for it in my own projects (and I don't program with Microsoft products anyways).

It is clear that for all basic programming purposes, .NET is not needed. Just stick to the C++ standard libraries (and no managed code, C# or C++/CLI).

For all other purposes, you will find good C++ libraries to use. Just name your type of application and surely people will find good libraries to suggest.

In my opinion, if your application doesn't fall directly in the niche of the .NET framework (i.e. web applications that rely heavily on security protocols, databases, and networking) there is little advantage to this framework and plenty of drawbacks (performance, memory management issues, not portable, your applications run in the confines of a virtual machine, etc.).

I don't know VS too much (especially the newer versions) so I can't pinpoint a particular option to disable .NET completely (there must be one... otherwise MS would loose like 90% of the users of Visual C++ who program entirely in pure C++). I would say that the best way to disable .NET is to use GCC (MinGW) as your compiler instead (all it will compile is just GNU standard C++.. and none of the MSBS (*) ).

(*) Microsoft Bullshit

Just select a "Win32 console project" to do "regular" C++. The alternative to .NET is using a "Win32 project," where you can use the Win32 API (see http://www.winprog.org/tutorial/ for an excellent intro to the subject). There's a steeper learning curve for the Win32API, but it brings you much closer to the OS.

I would at least take a look at some benchmarks before denouncing it completely, Mike. Intuitively, it feels like it should be slow as molasses, but in practice the JIT compilation can actually make it faster (see http://stackoverflow.com/questions/1500584/performance-difference-between-c-and-c-for-mathematics).

not portable

Not true anymore. Mono Project?

I find it easy to avoid .NET because I don't see any purpose for it in my own projects (and I don't program with Microsoft products anyways).

It is clear that for all basic programming purposes, .NET is not needed. Just stick to the C++ standard libraries (and no managed code, C# or C++/CLI).

For all other purposes, you will find good C++ libraries to use. Just name your type of application and surely people will find good libraries to suggest.

In my opinion, if your application doesn't fall directly in the niche of the .NET framework (i.e. web applications that rely heavily on security protocols, databases, and networking) there is little advantage to this framework and plenty of drawbacks (performance, memory management issues, not portable, your applications run in the confines of a virtual machine, etc.).

I don't know VS too much (especially the newer versions) so I can't pinpoint a particular option to disable .NET completely (there must be one... otherwise MS would loose like 90% of the users of Visual C++ who program entirely in pure C++). I would say that the best way to disable .NET is to use GCC (MinGW) as your compiler instead (all it will compile is just GNU standard C++.. and none of the MSBS (*) ).

(*) Microsoft Bullshit

Just select a "Win32 console project" to do "regular" C++. The alternative to .NET is using a "Win32 project," where you can use the Win32 API (see http://www.winprog.org/tutorial/ for an excellent intro to the subject). There's a steeper learning curve for the Win32API, but it brings you much closer to the OS.

I would at least take a look at some benchmarks before denouncing it completely, Mike. Intuitively, it feels like it should be slow as molasses, but in practice the JIT compilation can actually make it faster (see http://stackoverflow.com/questions/1500584/performance-difference-between-c-and-c-for-mathematics).


Not true anymore. Mono Project?

In response to jonsca, the Mono project isn't as up to date as the Microsoft implementation of .net for obvious reasons but it does help. :)

In response to mike_2000_17, I think the reasoning here should be "Use the right tool for the job". If you're programming on and for a windows machine, development can be made much easier and quicker with the use of .net. Just like Java programming can be a quicker alternative to coding C++ for Linux...

If your specification sites that the machines don't have .net installed, then use Win32/MFC. If they're to run on Linux then pure C++/X Window System. if they need to run on both, Java etc etc.

It's not fair to say ".net is crap" or "C++ is crap", or "Y is 20% slower than Z" (where performance on that kind of scale isn't important. i.e. Non Real Time apps)

You simply use the right language for the circumstances and job at hand.

In response to jonsca, the Mono project isn't as up to date as the Microsoft implementation of .net for obvious reasons but it does help.

Yes, after I'd written that I'd thought about looking into the extent that it was compatible, but got sidetracked. A very good point.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.