Desmond File

Blog archive

C# and Darwinian Theory

When Charles Darwin published "On the Origin of Species" in 1859, it turned the scientific community on its ear. His theory of natural selection fundamentally changed our understanding of the development of living organisms.

Darwin's theory can apply just as well to the world of programming language development. Over the decades we've seen languages evolve from elemental machine code and assembler constructs, to higher-order 3GL and 4GL languages that let developers economically perform increasingly complex tasks. Just as a single-cell bacteria ultimately gave rise to sea- and later land-borne vertebrates, so has the early work on machine code given rise to Java, C#, Ruby and Python.

But evolution is a tricky thing. Acquire the wrong adaptation, and your branch could be headed for the dustbin of history. That's the concern that keeps Anders Hejlsberg up nights. As the Microsoft technical fellow responsible for creating the managed C# programming language and many of the underpinnings of .NET, Hejlsberg is always on the prowl for ways to keep C# relevant.

That includes ushering dynamic typing and functional programming concepts into the statically typed, imperative C# language.

"The thing about languages, and this is generally true for all languages, is that there is a certain lifecycle to them," Hejlsberg explained to me. "Languages age. Every time you add a new feature to a language, you age it, because it sort of accrues conceptual weight, if you will. And eventually it will cave in under its own weight, because there are just too many features that have too many subtle interactions and whatever. This is the inevitable lifecycle of pretty much any language."

Hejlsberg credits the enduring success of C# -- which began development in December 1998 -- with the active, consistent and thoughtful engagement of the C# language group at Microsoft. He said the same team of people have been meeting to discuss the direction of C# ever since.

"Within six months we fell into a rhythm of having three weekly design meetings, starting at 1 o'clock and lasting at least two hours. And you know, that series of meetings is still ongoing. In fact, until recently it was still in the same room," Hejlsberg said.

That consistency has allowed C# to retain its fundamental character, Hejslberg said. He noted that despite its functional talents, C# will never replace F# for true, declarative programming tasks. Nor will C# ever replace Ruby for a fully dynamically typed environment.

"You can't fundamentally change the nature of the beast. C#, its core design center was to be an imperative, object-oriented programming language. Now you can add features that you borrow from functional and dynamic, but it still has that core center of gravity, and you can't really change that. Because now you end up with sort of schizophrenic language."

What are your thoughts on C# development? Is the language heading the right way, or would you prefer to see more profound changes? E-mail me at [email protected].

Posted by Michael Desmond on 01/20/2009


comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube