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

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: