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 at 1:15 PM

comments powered by Disqus


  • Microsoft's Tools to Fight Solorigate Attack Are Now Open Source

    Microsoft open sourced homegrown tools it used to check its systems for code related to the recent massive breach of supply chains that the company has named Solorigate.

  • Microsoft's Lander on Blazor Desktop: 'I Don't See a Grand Unified App Model in the Future'

    For all of the talk of unifying the disparate ecosystem of Microsoft-centric developer tooling -- using one framework for apps of all types on all platforms -- Blazor Desktop is not the answer. There isn't one.

  • Firm Automates Legacy Web Forms-to-ASP.NET Core Conversions

    Migration technology uses the Angular web framework and Progress Kendo UI user interface elements to convert ASP.NET Web Forms client code to HTML and CSS, with application business logic converted automatically to ASP.NET Core.

  • New TypeScript 4.2 Tweaks Include Project Explainer

    Microsoft shipped TypeScript 4.2 -- the regular quarterly update to the open source programming language that improves JavaScript with static types -- with a host of tweaks including a way to explain why files are included in a project.

Upcoming Events