Microsoft's C# has been named the No. 1 programming language of 2012 by the PYPL PopularitY of Programming Language index. According to the PYPL index, C# saw the greatest growth in 2012, rising more than 2.3 percent—by far the biggest growth of any language over the past year. C# in 2012 surpassed Java, PHP and C++, according to the index. The PYPL index is based on data from Google Trends, which measures search volume, and the results are based on the relative number of searches for programming tutorials in the given language. With the popularity of C# growing, Nat Friedman, CEO and co-founder of Xamarin, which makes cross-platform mobile development tools, outlines what's fueling C#'s growth and the reasons it's increasingly being adopted by companies of all sizes for mobile development. The C# language is used by more than 200,000 Xamarin developers, the company said. Borrowed from a recent blog post, here is Friedman's list of reasons for C#'s popularity as a mobile programming language.
- Cutting Edge: Asynchronous programming is a first-class language feature and turns what is typically regarded as boring, repetitive and error-prone coding into a more simple experience, Friedman said. And anonymous types, lambda expressions, type inference, functional-style programming and LINQ allow developers to write code that is highly expressive and easy to maintain.
- Powerful Features. Object-oriented programming and encapsulation make it easier for developers to structure code for maximum reuse. Capabilities like reflection and dependency injection offer developers a lot of power and flexibility.
- Advanced Runtime. Garbage collection greatly simplifies development by eliminating the cognitive overhead of manual memory management. Developers can focus on solving problems that matter, instead of fighting with pointers.
- Reliabillity makes it faster and easier for programmers to detect and isolate bugs at compile time, which is an especially important characteristic in mobile development, where the build/run/test cycle is lengthened by the need for specialized packaging and deployment to a device or emulator. With compile-time sanity checking, C# developers don't have to wait until their program crashes to find obvious errors.
- Easy to Adopt: Friedman said C# is an easy language to learn, especially for developers who are already familiar with the principles of object-oriented programming. The enormous body of available C# reference material ensures that new developers never get stuck, he said.
- Fast Execution: C# on Apple's iOS is powered by the LLVM optimizing compiler, the same backend used by C and C++ that powers the operating system, giving developers the best of both worlds: the high productivity of C# and the performance of a low-level language. On Google's Android, C# performs better than Java both because of language design choices (support for value types, real generic types and nonvirtual method defaults) and the more mature Mono runtime, compared with the relatively young Dalvik, Friedman said.
- Native Access: Seamless interoperability with native code gives developers the best of both worlds. You can bind native libraries and leverage the power of P/Invoke to expose additional functionality to the world of managed code. This is how Xamarin has exposed 100 percent of the native APIs on iOS and Android to C# developers, giving them access to the full expressive power of the underlying platform, as Rdio recently demonstrated with their C#-based iOS and Android apps, he said.
- Portability: Between Windows, iOS and Android, developers' C# code can run on more than 2.2 billion devices. In addition, beyond mobile, C# is highly portable in a wide range of environments across the spectrum of mobile, embedded, desktop and server computing, Friedman said.
|