Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

TLDR: write better code

functional programmers get to express their ideas as code

imperative programmers are so busy playing whack-a-mole with their bugs that they don't have time to think about new ideas

just look at the research[1] coming out of the <del>Clojure</del> functional programming community - especially Datomic. once you learn how to get your defect rate under control, you have time to explore crazy awesome new ideas

    [1] https://thestrangeloop.com/archive/2011
    [1] https://thestrangeloop.com/archive/2012
edited


functional programmers get to express their ideas as code imperative programmers are so busy playing whack-a-mole with their bugs that they don't have time to think about new ideas

Stop drinking the cool-aid. Functional programming solves a lot of typing errors (if the given language has stronger typing than an imperative language) and makes composition easier in some cases (if the language is lazy).

But: an algorithmic error is still an algorithmic error, an incorrectly designed data structure is still an incorrectly designed data structure. No matter what language you use.

In addition to that, you get back a different set of problems: e.g. you have to reason about when something gets evaluated in a lazy regime in order for your program's heap not to blow up, and the translation to machine code is often not nearly as simple as an imperative language, which makes it harder to optimize functional programs.

(Ps. I love functional programming.)


Most bugs have nothing to do with the code being imperative.



You don't have to convince me of OOP's faults; Clojure is my favorite language. But I write code for a living, mostly in OOP because that's where the jobs are, and I do not write very many bugs caused by OOP's poor design. I write bugs when the business is ill-defined, or when I misunderstand how a library's APIs are supposed to work, or when I'm careless and don't consider "what do I do if this function returns false"; all stuff that will come up in FP as likely as it will in OOP.


Languages like Haskell show this tendency too, e.g. Oleg's work[1] (which includes research with lisps) although he also does awesome stuff with imperative languages too.

[1]: http://okmij.org/ftp/


> functional programmers get to express their ideas as code

The flaw is in us. Our ideas are malformed and flawed. Simply expressing ideas is not enough.


interesting - do you have a resource / starting point for diving into some of this research?



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: