aof_doomchild (aof_doomchild) wrote in computerscience,

  • Mood:

Functional woes

Introductions would generally be in order, but I think geeks are more amenable to meeting people via questions.  Could just be my own interest projecting, though.


I've got a little bit of a quandary.  I decided a month or two ago to get into functional programming.  As for background, I program almost exclusively in C# (although there is always a little C++ hiding somewhere), which most people will recognize as a very imperative, object-oriented language.  I'm aware that C# 2.0 added several functional-like bits, and that C# 3.0 will continue that trend, but it's still all kinds of static.  I've been working with C/C++/C# for about 7 years now, and school before that was almost entirely devoid of functional concepts (aside from AI, which introduced them from the side, without really discussing them).

To that end, I've spent about a month pacing to and fro across the web, reading everything I can understand about Haskell, F#, Boo, Python, LISP, Scheme, and OCaml.  My major problem is that I have no clue how to think about problem solving in a "functional" way.  OOP was beaten so deeply into my skull that I can't help but start thinking about classes and interfaces the instant I need to do something.  I have a grasp on some of the ideas behind functional programming - things like computing via function composition, stateless programming with a lack of side effects, etc.  The problem is that I have no idea how one goes about writing anything more involved than the same factorial function I've seen eight thousand times without intermediate variables or side effects!

Anyway, I'm mainly wondering if anyone knows of a book, website, or whatever, that can help me understand how one goes about breaking down a problem to be solved in a functional language?  Tutorials seem to take one of two approaches:  complete beginner who has no idea how to add two numbers together in a language, and doctoral thesis that uses words longer than my arm in at least three sentences per paragraph.  I'm in between the two, and struggling to find helpful material.

  • Post a new comment


    default userpic