I had to write a small bit of throw away code today to validate some database entries. Iâ€™ve been playing a bit with F# at night and this would have been an ideal application of what Iâ€™ve been learning.Â UnfortunatelyÂ work has a strict C# only policy. Iâ€™m sure this isnâ€™t uncommon. Policies like this are in place so that other developers can jump into an application quickly and help out or pick up where others left off. On the surface it seems to be a great idea and Iâ€™ve probably suggested putting policies like this in place in a previous life. Today I got to thinking about the policy and decided that it is actually terribly flawed.
The premise is that the hardest thing about picking up a new project is learning the language in which it is written. TheÂ interestingÂ thing about that is that if you ask any developer how long it takes to pick up a new language they will say â€œan afternoonâ€ or â€œa couple of daysâ€.Â AdmittedlyÂ some of that may be developer hubris but even if the estimate is out by a factor of two it still isnâ€™t very long. The vast majority of the learning curve for joining a new project is in understanding the architecture and the design as well as figuring out where to make changes. Knowing the language in which the application is written is going to be of minor help in that case. Good architecture can and does exist in any language.
On the other side of the equation preventing developers from trying out new languages narrows their field of expertise. Supposing that the language is only used by the developer briefly for one project they may still learn new practices or patterns which are unique to the language.
The principle ofÂ linguistic relativityÂ holds that the structure of aÂ languageÂ affects the ways in which its speakers conceptualize their world, i.e. theirÂ world view, or otherwise influences theirÂ cognitive processes.
I know that learning typescript and F# has opened my eyes to different ways of doing things in my regular C# code. There are also some tasks which are easier in one language or another. I find it very difficult to justify spending more money on the development of an application in C# if the same business needs can beÂ satisfiedÂ for half the price in another language, say Python or Scala. Just as only planting a single crop is dangerous so is supporting only a single language.
As an added bonus experimenting with other languages is a great way to keep developers. We devs love learning new things and if your company canâ€™t keep developers through high pay then cool technology a good alternative.
Developing in other languages isnâ€™t something to be feared, it is something which should be cautiously explored.