6 ms·
99 questions
- zephyrfalcon 16y agoThis 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.
- MWinther 16y agoI 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.
- henning 16y agoIf you're having C problems I feel bad for you son, I got 99 problems but a side effect ain't one!
- CamperBob 16y agoHonestly, I may have 'C problems', but I also have code that can be read by normal human beings.
- baddox 16y agoYou 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.
- CamperBob 16y agoQuestion: 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?
- amock 16y agoI 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.
- chc 16y agoYou'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.
- baddox 16y agoOne 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.
- adbge 16y agoC 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.
- amock 16y agoAre 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.
- arst 16y agoMyself and another contributor have played around with answering the 99 Prolog/Lisp/Haskell problems in Factor (http://factorcode.org/ http://factorcode.org/) at http://github.com/mikejs/factor-problems http://github.com/mikejs/factor-problems