12 comments

[ 2.7 ms ] story [ 36.9 ms ] thread
This is interesting stuff, but I do wish they didn't show the solutions immediately after the question. The Prolog and Lisp versions do this better, by providing a link to the solution.
I don't know any functional programming languages, and for me having the answers next to the question made it interesting. I am still curious to try functional programming, but I've always leaned towards elisp instead, since I have an obvious application for that.
If you're having C problems I feel bad for you son, I got 99 problems but a side effect ain't one!
Honestly, I may have 'C problems', but I also have code that can be read by normal human beings.
You mean human beings that program in C and C-influenced languages. Just because the world is this way doesn't mean that it should be.
Question: why don't I see sites like "99 trivial, first-week-of-class problems solved in C?" If I have to stop and think about how to do the things on that page, or consult a web page to find out how to express them, then the language I'm working in is simply broken.

What problem(s) do software developers typically have that are solved by working in functional languages?

I think it's because these things are hard to do in C. The first week of C is all about dealing with the language rather than solving problems. Any problem can be solved in a functional language, so I'm not sure what you're asking.
You've never seen a beginner C tutorial? You seem to imply that just because there's teaching material out there for beginners, that somehow means the language is intractable. Every language that wants users should have beginner-level material.
One difference is that basic C/C++/Java books are always attempting to teach programming or even discrete/logical thinking at the same time. Most of the basic books I've seen start with some silly over-extended analogy for procedures, loops, etc. along with a few examples of supposed "real-world" problems.

Once you know how to program, learning lesser-known languages like Haskell or Lisp is all about learning how to do basic things differently. For example, The Little Schemer taught me to think of iteration in terms of recursion and vice-versa. Haskell and Lisp books (at least good ones) don't teach you how to make a virtually featureless pizza ordering system or a recipe database, they teach you a new way to think about the building blocks of programs.

These "99 question" lists aren't supposed to be brainteasers or math puzzles like, say, Project Euler, they're supposed to be illustrative of what sets these languages apart from the more commonly-known C-style languages.

C code cannot be easily read by normal human beings unless they have had extensive training with C (which would probably make them abnormal). Haskell seems to me, as one who has little experience with either, much more readable than C code.
Are you saying that Haskell is unreadable? I've found Haskell to be very readable. Complicated code is much easier to understand in Haskell due to the limited side effects. Maybe people who know C find Haskell harder to understand, but I've talked to people who can't program and they've usually understood the Haskell code better.