Monday, July 23, 2012

C++ revisited

During my academic and professional life I've been in touch with lots of different programming languages, for example:
Pascal, C, C++, Prolog, Java, Lisp, Javascript, C#, Smalltalk, and many others.

With time I lost contact with most of them, except C#, Java and Javascript.

Recently, as explained in my blog, I began to delve onto mobile game development using C++, mostly because it's a supported language in most mobile operating (iOS, Android and Windows Phone 8), and the "El Dorado" of being able to develop once and run everywhere (sort of).

Thus, and although many years had passed, I was still able to handle most basic stuff in C++, but always missing the goodies that C# provides, and wrestling with the low-level aspect of the language. C++ was, for me, a necessary evil. Also, I was treating it as the same language that I learned 15 years ago, not acknowledging that it could have changed. How wrong I was...

On the other day I was listening to the DotNetRocks podcast, namely show 695, where they invited Kate Gregory to talk about C++. She is an enthusiastic lady, and she talked about C++ 11 and its new features, and that it no longer is the language that people associate with manual memory management, low-level and complexity and that it's still one of the most widely used computer languages today. Also, lots of libraries have appeared (like boost) that deal with lots of heavy-lifting for the developer (for example, smart-pointers).

literally add some "wow" moments while I realized that many of the things that I thought I knew where wrong. It got me terribly interested in learning some more so I subscribed PluralSight and am currently watching all the C++ tutorials (also by Kate Gregory) from the basics.

It's being an eye-opener for me. Also, C++ is a first class citizen in Windows 8, and it'll be able to take advantage of most of the IDE richness that C# has had over the years, like designer support for XAML. I believe this is a good time to (re)learn C++ and use it, for instance, in Windows 8 Metro design.

Regarding changes in C++ 11, I'll just borrow this blog post which explains everything brilliantly:

Things like lambda expressions, auto-types (the var in c#), asynchronous stuff, smart-pointers (and much more) are all there. Great stuff.

I'm not ready to dismiss C# as my favorite language but I'm certainly interested in adding C++ to my programmer's "bag of tricks" :)

No comments:

Post a Comment