Feeds

C# pulling ahead of Java

Lead architect paints rosy C# picture

Secure remote control for conventional and virtual desktops

C# has come a long way since it emerged from Microsoft's mythical "Project Cool" back in 2000. It is the primary language of Microsoft .NET, and has pulled ahead of Visual Basic among professional Windows programmers.

At last week's Tech-Ed conference in Barcelona, C#'s lead architect Anders Hejlsberg drew large audiences for his sessions on the future of the language.

The big new thing in C# 2.0 was generics. So what's coming in C# 3.0? The headline feature this time is LINQ (Language INtegrated Query), which integrates database query as part of the language.

Why LINQ? "It's effectively to remove the impedance mismatch between a programming language and databases," Hejlsberg said. "The whole concept of query and set transformations is one that really has been missing from general purpose programming languages for no good reason. Why is it that I can query data when it sits in a database but the minute I fetch it into memory I can't query it at all? I can write primitive for loops and if statements, but I have nothing that even approaches the declarative query power that you see in SQL or XQuery?"

LINQ is built on lower-level language features including lambda expressions and expression trees (which allow lambda expressions to be represented as data). Hejlsberg said much of this is borrowed from functional programming. "In C# 3.0 we are looking at a lot of research that has occurred in functional programming languages. Lisp is the classical grandfather of a lot of functional programming, but also Haskell and ML."

When C# first appeared, it looked in some respects uncannily similar to Java. Since then, Java's designers seem to have returned the compliment, with features such as autoboxing (treating simple types as objects) and liberal use of annotations seeming to echo similar features in C#. Are the two languages becoming one and the same?

"If I look at where the innovation is occurring, I would venture to say that we're being a bit more innovative these days than is the case in the Java world," he said. "Java has generics, but they chose to do it in a different way where it's really just compile time sugar that goes away, and they don't in my mind realise all the full benefits of not just a generic language but a generic type system in the runtime. I think we're pulling ahead a bit now by pulling all these functional concepts into C#, and language integrated query is an innovation that is only in C#."

Java on the other hand is cross-platform and is being open sourced. Then again, there is Mono, an open-source implementation of C# and the .NET framework sponsored by Novell. Does Microsoft support or oppose this competition?

"I welcome other implementations, and the Mono guys have participated in the standardisation process in ECMA. We remain committed to the standardisation process with .NET and C#, wherever that may take us."

The trouble is, while this welcome may be true of the language and core runtime, Microsoft's attitude to the non-standardised parts of its Framework, including the popular ASP.NET web platform, is less clear. The recently announced agreement with Novell gives little real comfort, other than to a narrow range of Novell customers, and may even increase the suspicion that Microsoft may one day cause legal problems for Mono. Otherwise, why is there need for a patent agreement? Microsoft needs to do more before cross-platform C# can reach the mainstream. ®

Secure remote control for conventional and virtual desktops

More from The Register

next story
PEAK APPLE: iOS 8 is least popular Cupertino mobile OS in all of HUMAN HISTORY
'Nerd release' finally staggers past 50 per cent adoption
Microsoft to bake Skype into IE, without plugins
Redmond thinks the Object Real-Time Communications API for WebRTC is ready to roll
Microsoft promises Windows 10 will mean two-factor auth for all
Sneak peek at security features Redmond's baking into new OS
Mozilla: Spidermonkey ATE Apple's JavaScriptCore, THRASHED Google V8
Moz man claims the win on rivals' own benchmarks
Yes, Virginia, there IS a W3C HTML5 standard – as of now, that is
You asked for it! You begged for it! Then you gave up! And now it's HERE!
FTDI yanks chip-bricking driver from Windows Update, vows to fight on
Next driver to battle fake chips with 'non-invasive' methods
DEATH by PowerPoint: Microsoft warns of 0-day attack hidden in slides
Might put out patch in update, might chuck it out sooner
Ubuntu 14.10 tries pulling a Steve Ballmer on cloudy offerings
Oi, Windows, centOS and openSUSE – behave, we're all friends here
prev story

Whitepapers

Why and how to choose the right cloud vendor
The benefits of cloud-based storage in your processes. Eliminate onsite, disk-based backup and archiving in favor of cloud-based data protection.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
New hybrid storage solutions
Tackling data challenges through emerging hybrid storage solutions that enable optimum database performance whilst managing costs and increasingly large data stores.
The Heartbleed Bug: how to protect your business with Symantec
What happens when the next Heartbleed (or worse) comes along, and what can you do to weather another chapter in an all-too-familiar string of debilitating attacks?