I’ve been using C for my classes and I can’t help but be really really happy about that. I’ve played with C before. Well, actually, C was my first language. I tried learning it as a stepping stone to Objective C and iOS development, but I quickly gave it up after getting to pointers and arrays. Granted, I was like 11. After that, I’ve played with C in various places. First, I had to use C++ in an internship, where I got to play around with performance optimization and profiling. Then, last year because I was bored with using Java in my classes, I started to write some data structures in C. Just basic stuff like linked lists, binary trees, maybe a hash table. I found it really intriguing and a lot of fun to play with. Oh sure, segfaults were annoying and the whole lack of decent typing or safety led to some less than safe code. But overall it was a good experience.
Like take lexical scoping. C doesn’t allow you to declare functions in functions. The best you can get are function pointers. But as a result, functions and their lexical scope map cleanly onto stack frames. You don’t have to worry about closures or about resolving scope dynamically. Hell, you can’t call functions before they’re declared, forcing you to use header files. This means that the map from code to implementation is just about the simplest thing. You can resolve scope just by looking at the code. And that’s so damn cool.
Of course, there’s plenty of annoying issues, not to mention the whole concept of memory safety. But it’s probably the most fun I’ve had just programming, barring messing around with Lisps. Now if only I could find a good project to write in C…