/ :: bitbashing

I Must Admit I Don't Quite Understand the Thought Process

A couple of months ago we were interviewing in an attempt to find a C# developer who could write some front ends that would interact with our C++/Python backend trade systems. We phone screened a number of people, and brought a handful in for an afternoon of interviews. One of them had a decent amount of C++ experience, so at one point late in the interview I asked him what features of C# he particularly liked that weren't in C++. His first response was that there were no pointers in C# which prevented a lot of bugs. When I probed further, he also mentioned that the lack of multiple inheritance was really nice.

At this point I was a bit taken aback. I had expected him to mention things like properties, reflection, and the extensive class library, not features that (while certainly a cause of bugs at times in C++) weren't there. If you find a language feature to be more bug-prone than the gain in expressive power is worth: don't use it! It's like a Python developer saying "I'm really glad lambdas can't contain statements" or a O'Caml programmer being happy that the garbage collector isn't multithreaded so you can only utilize a single CPU.

I'll admit that there are some cases where a languages lack of a particular feature can be a win; a good example would be Haskell's purely functional nature. In any (halfway-decent) language you can write all of your code in a purely functional style, but that Haskell enforces it (modulo a couple of escape hatches) means that there are a multitude of interfaces well suited for writing code in that style, and more importantly you can rely on other people's code to be referentially transparent. (As an aside, it's unfortunate that, aside from the GCC specific extension for "pure" functions, you can't specify a function as referentially transparent in C/C++ - the optimization opportunities when the compiler can determine that can be substantial).

In retrospect I wish I had probed deeper into his though processes when he named these language "features". I considered it but as I was the last interviewer in and it seemed everyone else was going to go thumbs down anyway (and I had plenty of work on my plate that I wanted to get started on), I decided to conclude my portion of the interview process, ask if he had any questions for me, and let him go.

Posted 2007/09/07 in programming; no comments

< Questions I Will Remember (Next Time) | Search Based Filesystem >

Name:


E-mail:


URL:


Comment: