Functional Programming

If you go to the link on ray tracing, you can see some of the images that I did. Simple stuff, but they were fun and interesting to do. The interesting part for me was that all of the ones that I did, I did to teach myself a few new functional programming languages: Erlang, F#, and Haskell.

This is kind of linked to my post about UI. The thing I liked about learning these functional languages is that made focusing on the problem at hand the point of coding, rather than fighting the language. Don’t get me wrong, I’ve used C/C++ for many, many years and am an expert at them. But if I want to whip out a demo of a new idea, or learn ray tracing, I like to prototype in a higher level language. That used to be Smalltalk back in the early 90s, then Python in the 2000s, but now I’ve switched to these functional ones.

When an idea strikes, I just want to sit down, type away, and make progress towards my goal of seeing my idea on the screen. The problem with C/C++ is that if one doesn’t already have the framework in place for the idea, a lot of time is spent on memory management code, allocating objects, defining APIs, etc. That kind of stuff is great for a performance person, since it gives me a lot of axises along which to tweak code for performance, therefore getting me a lot of performance jobs, but it isn’t so great when I have a weekend and want to explore ideas.

Just like with a bad UI, one can get things done if one has done it before, but with a good UI and a good programming language, getting stuff done for the first time is a lot of fun!

-Edward

Leave a Reply

You must be logged in to post a comment.