Developer's Toolkit

Blog archive

Bound to Be Right

I have not been a pure programmer for much of my career, but I have a good academic grounding in computer science, and like to sound like a computer scientist every once in a while. It was only well after I suffered through formal languages courses that I actually became interested in the topic of programming languages (this may have something to do with the poor ways that we teach formal language concepts).

That is why Brian Randell's session at VSLive! Boston caught my attention. Brian spoke of improving performance in .NET applications. But he did so in a rather roundabout way, which is the right way to do it. Many things in language design and implementation are not what they seem, and to approach performance by talking about differences in binding is the right way to do so.

I was especially taken by his exposition of early binding versus late binding. He equated them to strong typing and weak typing respectively, which is not entirely the case, but close enough to be able to make some points concerning their use. Noting that Ruby was a weak typed language that used late binding, he made the point that late binding generally produced slower code than early binding. That is true, of course, because it takes time to identify a type and bind data to a variable while the application is running. However, he noted that more experienced programmers can more easily make the determination of when the tradeoff is worth it.

He said that VB enabled programmers to use weak typing in some application files and strong typing in others, but C# didn't have this provision. This is one area that C#, which is clearly Microsoft's flagship language, can use a bit more flexibility.

I did a bit of Lisp programming as a graduate student, and especially appreciated the ability to treat an expression in any number of different ways before I was ready to use it. But Lisp always had the reputation as a slow language. Fortran, which is very strongly typed, is a very fast language.

I believe I've noted on these pages before Robert Heinlein's maxim on tradeoffs – TANSTAAFL – There Ain't No Such Thing As a Free Lunch. I have always tried to emphasize tradeoffs, rather than absolute rules, as the guiding principle in software development. It was good to hear my perspective validated in this way.

Posted by Peter Varhol on 10/25/2006


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