Closing the Book on My Scala Game (for now)
Scala is a wonderful language. In fact I think I'd refuse to work on the JVM without either Scala or Jython (maybe clojure, we'll see).
However, the siren song of C# is luring me back. It really is the most advanced mainstream development language in existence.
The real killer app api of c# is Linq. Linq is awesome. Linq makes programming in c# fun. Java and c# used to be pretty darn similuar, now c# has pulled way out in front. I think that Scala or Clojure are the only way Sun can keep up with MSFT in the language department.
Oh and if C# isn't enough for you, there's the funky functional F# which I've only played around with but found it pretty cool also.
I'll admint, I'm a polyglot.
I've been using Python to work through the project euler problems. While I find python fantastic for small scripts (like the one's for Euler) it just can't beat C# for large projects.
Jonathon Blow (of Braid fame) makes a good case for static languanges.
2) Do not underestimate the power of statically-checked languages for large projects. In such languages, the compiler is very much your friend. It enables you to do huge overhauls that would be much more difficult in a dynamic language. It works like this: you rip out all the old code, change whichever interfaces and data structures you want. Now the program doesn't link any more and gives you a ton of compile-time errors. But this is good -- this is how the compiler keeps track of all the tiny details for you, which functions you still need to write, which code you need to change to conform to new data structures, etc. You don't need to think about any of that stuff at all, or maintain to-do lists, or anything. The compiler does this record-keeping for you, freeing you to think more about the actual designs and implementations. To proceed, you just start at the top of the error list and fix the errors, one by one. When you're back down to 0 errors, you have done everything the compiler was reminding you about. And if you were perfect your program will now run. (Of course in a system this complicated you probably made some bugs that you now have to fix -- but it's way, way fewer bugs than you would have in a dynamic language).
2a) Dynamic Language Advocates will often talk about dynamic systems being great because they give you some Cool Paradigm that you don't have with static languages (like playing around in a read-eval-print loop, or something). But they don't seem to understand that static languages offer important paradigms, like 2) above, that are very useful for Getting Things Done. These things may be subtle, but they are still very valuable. The dynamic languages throw away this subtle, valuable thing for something more obvious but less valuable -- and they think they are winning. (There are other, even more subtle things, like the confidence the programmer has in individual changes... but I won't go into those here.) I am much more powerful as a programmer because I can rip out core parts of the code, yanking out tendrils that reach through the whole codebase (i.e. "lots of crosscutting concerns"), and I can do this without fear -- it's no big deal, everything will be back to normal in a few days. In a dynamic language, I would be so much more worried about this kind of change that I would do it rarely or never (I would be thinking, "ohmygod I am about to fuck up the entire code base, this is going to be a disaster.") Fear of change can be very bad -- it encourages code rot, which means your code slides slowly into unmaintainability.
So C# is the choice for my next prototype. Christopher Park used C# to create AI Wars. So I'm in good company (I think).
Anyway I'm not entirely done with my Scala game. I may return to it at some point. But right now my muse has pushed me in a different direction. So with a new prototype comes my reaquaitence with an old friend (actually I use C# everyday so it's my "best" language).
