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

comments powered by Disqus
Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.