Desmond File

Blog archive

Developers Debate C#

Tuesday's blog reported on a conversation I had with Microsoft Technical Fellow Anders Hejlsberg on the future direction of C# and how programming languages are increasingly breaking out of traditional boundaries like imperative versus functional, and dynamic versus static typing.

In the case of C#, the language has already picked up functional programming attributes found in languages like OCaml, Haskell and F#, while the upcoming C# 4.0 is being outfitted with dynamic typing capabilities. That addition should help solve a lot of thorny type interactions with COM, among other benefits.

The article prompted plenty of thoughtful responses from developers interested in advancements to C#. A number of readers worried that the addition of new talents could make C# more difficult to work with -- a concern Hejlsberg addressed when talking about the challenge of stewarding language development.

"One of the most frustrating things is the continuously expanding complexity of C#," wrote Dr. Brian Morris, director of Euronav Ltd., in Portsmouth, England. "Often, engineers will use a new feature just because it's there, when using the simpler constructs of a language would give a better solution."

Morris said he'd like C# to provide deterministic destruction, which he said would make C# more suitable for near-real-time applications. "Perhaps a solution would be to allow the switching off of garbage collection for everything in a specified class/assembly and allow the destuctors to work as they should," he wrote.

In addition to complaining about what he called "subtle gotchas" in C#, Morris would also like to see the language gain the "ability to fully pre-compile and link for distribution as a near-native application" for improved security and faster start-up.

Richard Philip Doble in West Yorkshire, England, said C# has a ways to go before it can lure him away from Java. He says he would like several concepts from Java incorporated in C# -- checked exceptions that could be toggled on or off on a per-file basis, more flexible enumerations that can implement interfaces and accept custom members, and nested classes that are visible to the enclosing class.

He also applauded Java's Swing components, which exist as views of the underlying default or custom model. "This nicely separates the data from the view. Also, the same table can be made to display different data sets simply by assigning a reference to different model instances," Doble wrote. "I prefer this approach to the .NET components that retain internal copies of the data that is being displayed."

But not everyone is convinced that C# needs a makeover to succeed. Reader Ronald Jones implored Hejlsberg to leave C# be. "Languages, once created, need to remain static for the most part. Change a library, add a framework, but stop changing the language!" he wrote. "If C# has any future, it must cease to be a moving target."

Should Hejlsberg keep his hands off C#? Or do you look forward to C# 4.0 further advancing Microsoft's flagship programming language? E-mail me at [email protected].

Posted by Michael Desmond on 01/22/2009


comments powered by Disqus

Featured

Subscribe on YouTube