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

  • 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