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

    Functional Programming puts all the symbols 
    and problem-space in your head at one time
I feel like the natural response is "then you're doing it wrong", but I think that's too dismissive. My comments do not apply universally across so-called functional languages, but I think it holds as a point of note. That is, when thinking about a system functionally one tends to conceptualize the data in the system and how it gets from looking like one thing to looking like another. How it gets from point A to point B are matters of detail. So while I understand what you mean, I'm not sure that it's emblematic of how functional thinking is actually done. Functional thinking is less about functions than data.


Yes. I think we're saying the same thing.

By "link" I specifically meant data, not functions. Because everything is potentially visible, FP requires you to keep track of data structures in your head -- sometimes complex data structures with non-trivial relationships to other data structures.

Of course, there are methods to keep it simple -- starting small and growing as needed comes to mind first -- but if you're writing FP in a legacy environment with lots of nasty complex data structures you have a big headache. This would not be true in the same data environment with a well-constructed OO tier. [insert discussion here about what makes a well-constructed OO tier]

Or maybe I missed it. If I did, please straighten me out.


Your comparing "nasty" fp with "well-structured" OO, but let's ignore that for the moment.

My experience is the opposite. I run into a lot of nasty legacy OO code (think java not smalltalk) and it's very hard for me to refactor it piecemeal. I've been doing a clojure project at work for the past 6 months and it's surprisingly easy to refactor side effect free code.


    but if you're writing FP in a legacy environment 
    with lots of nasty complex data structures you have 
    a big headache. This would not be true in the same 
    data environment with a well-constructed OO tier.
With fp languages the tendency is to think in data and abstract via functions. If your functional tier is well-constructed then all is good right? [insert discussion here about what makes a well-constructed functional tier] ;-)


Pretty much all recent functional languages deal with oo programming by using multimethods and namespaces. This takes care of the problem you're talking about in a beyer way than most oo languages.


In modern Languages you have namespaces and namespaces let solve the problem your discribing.




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

Search: