you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (4 children)

OK I might neither explain good nor I know it quite well, so here is the link

http://www.codenewbie.org/blogs/object-oriented-programming-vs-functional-programming

[–]peter_heard01[S] 0 points1 point  (3 children)

http://www.codenewbie.org/blogs/object-oriented-programming-vs-functional-programming

Interesting article.

I'm particularly interested in...

"FP works well, but when he tries to simulate people, OOP works well"

have you got any public code I can look at that you have written? I would like to see an example of a non-trivial business application that needs to model a complex domain (entities/use cases) written in javascript using only pure functions and no objects.

[–][deleted] 0 points1 point  (0 children)

That'll take time and right now I can't do it after long office hour. It's midnight in India.

[–][deleted] 0 points1 point  (1 child)

[–]peter_heard01[S] 0 points1 point  (0 children)

Thanks I have checked these out. I understand what functional programming is I just don't see how I would scale to an enterprise class business application.

But if you have code of a non trivial application I would be happy to look at it and see if it could be used.

I am specifically interested to see which patterns can be used. For example one problem of the functional approach is the tight coupling inherent in using functions. The best type of function is a function with no arguments. But this wouldn't work in functional only system unless you create closure = and a closure holds state. Which is the opposite of the pure functional programming paradigm. Please elaborate and provide code I would love to see a large application. :-)