Monday 11 December 2006

C++ In or Out?

Java has been there for almost 12-14 years. Microsoft.NET has been in place for almost 5 years. As you all know, .NET initiative is the Microsoft's strategy to confer competition to Sun's J2EE or more famously the Java Technology.

When Java was launched, people thought, concepts such as memory allocations, pointers are then words of history. But still C++ had its own place in the world of software development. The basic plus point C++ always had was flexibility & power. "Memory leaks, if we develop it in C++" - general misconception still prevails in the world of software development.

Still, Low level programming requires a lot of flexibility, which only C++ provides.

Similarly when .NET was launched, three new languages were introduced to provide a mechanism for people with different language expertise to jump into the world of .NET. VB programmers were provided a road map to move to VB.NET. Java programmers were tempted to move to C# and for more big time Java fans a clone of Java for .NET was introduced - J# encouraging them to use their Java expertise to develop applications targeting .NET Framework.

C++ programmers were feeling a bit left out. With the first couple of versions of .NET (1.0 & 1.1), Microsoft provided a new form of C++ called Managed C++ or MC++ for the C++ programmers to migrate to .NET.

And the next couple of years was a nightmare for C++ programmers. I am sure all of you would agree to this, MC++ sucks. How many of us found working with MC++ was cumbersome? How many of us felt that C++ is getting a step-brotherly treatment in the world of software development? The answer to these are - ALL. The syntax of MC++ was extremely messy making the programmer scratch their heads to distinguish between Pure C++ code and MC++ code.

Oh, by the way, MC++ was supposed to be code written in C++ to target the .NET framework. Soon, C++ programmers started losing faith in Microsoft, started giving up hopes to do anything more on C++, if they have to develop any application for Windows.

Just at the right time, Microsoft C++ team played a vital role in reviving the importance of C++ and making it stand again as of today to be the most powerful language. May it be developing for .NET platform or for native applications, one can write C++ code with all their existing skills. With a major redesign in MC++, it is now possible to have 1 single unified language now called C++/CLI which has got clear distinctions syntactically for writing applications targeted for .NET and also native applications.

What is C++/CLI?

The Visual C++ team spent a lot of time listening to users working on .NET and C++, and decided to redesign the C++ support for the CLR (Common Language Runtime). This redesign is called "C++/CLI" (CLI stands for Common Language Infrastructure) , and is intended to provide a more natural syntax for consuming and authoring CLR types. C++/CLI is introduced as part of the Visual C++ 2005 (part of Visual Studio 2005)

What's good about C++/CLI?

  • C++ intact for native application development.
  • Use C++ to target applications for .NET CLR too.
  • Connect Windows Native Applications and the new .NET applications with ease using C++/CLI
  • Migrate your truckload full of native C++ applications to .NET by doing a gradual module to module porting of native code to .NET code (This is very easily done using C++/CLI's new syntax and its rich mixed mode support)
  • For rich pure .NET CLR based applications too, it is not completely true that C# is the only best language available. C++/CLI has been slowly emerging as the most powerful language available for targeting applications for CLR.

(More on the above points, in my next blog, till then search the net on C++/CLI and there are loads of information already that would be very helpful to you to get started)

So C++ enthusiasts, C++ not just still exists, but it rocks and soon retain its status as the the most favourite language in the world of software development. So..... Let Us...CLI

All the views expressed here is solely of the author and does not reflect in any way any company the author is associated with. The matter expressed here is AS IS with NO WARRANTY explicit or implied.