Confessions of a Static Typing Bigot

by coatta 4/22/2012 12:11:00 AM
I've been a strong typing bigot most of my (programming) life. Pehaps not too suprising for a guy whose favourite saying is "Every thing has it's place, and every place has it's thing." But, like some self-righteous character on a bad TV show whose comeuppance is thoroughly telegraphed, late at night I would sneak off, open up my text editor, and do some JavaScript programming. Sure, I felt guilty, but it was fun, and it didn't seem quite so much like work.

But its not like I was ready to abandon strong typing either. There truly were situations in which is seemed helpful not only to me, but to the developers I worked with as well. So, I thought to myself, maybe dynamic languages are for fun, and statically styped langauges are for "real" work. Of course, I look around me, and people seem to be accomplishing a lot of "real" work with these "fun" languages.

For a number of years, I have eschewed any particular development methodology. It seemed to me that the needs of a given organization and development team could vary substantially from one company or even one project to the next. Simply adopting one methodology and trying to force fit it into every context clearly didn't make sense. You should build up your methodology from elements that matched the needs of the particular team and project.

I'm coming to realize that this seems to apply more broadly. The choice of platform, programming language, architectural patterns, infrastructure components, etc. are all highly context dependent. So, where do dynamic languages work well? My sense, is that they are great when you have small teams with great communication. They work well with what I think of as great developers; those who care about design and are willing to take the time to ensure that it is adhered to. They definitely let you build things more quickly and sometimes with better clarity in the code. And some of my friends on the Queue board made the very convincing argument that they are the best tool for programming against the internet; when you are dealing with various different services that don't adhere to any single well-defined model.

I still find static typing useful. There are situations in which it let's me express my intent in the code more clearly. I think it's helpful to be able to say that the argument to a function I am writing is a List<Integer> rather than just a List. It tells you about the semantics that I am presupposing for the elements of that list, and the compiler will helpfully point out mistakes. I find interfaces incredibly useful for expressing abstractions and helping make sure that the encapsulation boundaries associated with those abstractions are not violated.

So, I'm going to try and avoid being a strong typing bigot from now on. I'll try to stay out of the methodology/platform/language/etc wars, and just choose things that meet the needs I am faced with.

Related posts

Comments


Calendar

<<  March 2024  >>
MoTuWeThFrSaSu
26272829123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar

Disclaimer

My opinions are my own, but you can borrow them if you like.

© Copyright 2024

Sign in