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

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube