Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do you think functional language is good for applications that have a lot of business rules but very few computation? [closed]

I am convinced that functional programming is an excellent choice when it comes to applications that require a lot of computation (data mining, AI, nlp etc).

Is functional programming being used in any well known enterprise applications or open source projects? How did they incorporate business logic into the functional design?

Please disregard the fact that there are very few people using functional programming and that it's kind of tough.

Thanks

like image 785
StackUnderflow Avatar asked Mar 07 '09 21:03

StackUnderflow


People also ask

What are functional programming languages good for?

Advantages Of Functional ProgrammingIt helps us to solve problems effectively in a simpler way. It improves modularity. It allows us to implement lambda calculus in our program to solve complex problems. Some programming languages support nested functions which improve maintainability of the code.

What is the purpose of functional language?

"Functional language" is language that we use to perform various "functions" such as giving advice or apologizing. Functional language typically uses fixed expressions for each function–for example "if I were you" or "my suggestion is" in giving advice, and "it was my fault" or "please forgive me" in apologizing.

Is functional programming really better?

Object-Oriented Programming is better for projects that require more complex data structures or Inheritance. At the same time, Functional Programming is better for projects that require more complex algorithms or higher performance.

Why is functional programming good for big data?

Therefore, Big Data has given rise to the re-emergence of functional programming, a programming paradigm that for a long time was considered niche. Functional programming lends itself to producing code that can be proved correct and can be distributed across more than one machine without the fear of unexpected results.


2 Answers

Functional programming languages like Clojure and Scala are good for pretty much anything. As for Haskell, an experienced Haskell programming would probably be able to substitute Haskell with any language for any problem - Efficient or not. I don't know if there is a functional programming language that could be considered /best/ out of all languages for this specific problem, but rest assured it will work and very well at that.

Also, Clojure and Scala are implemented on the JVM. So technically they /are/ on an enterprise platform.

like image 75
Rayne Avatar answered Sep 30 '22 08:09

Rayne


What are business rules if not functions? Application of rules can be expressed as applying a function to a set of data. It can also be combined with polymorphism. e.g. through generic functions (multiple dispatch can be handy, too) and inheritance.

Code is data, data is code, and both should be like water.

like image 21
Svante Avatar answered Sep 30 '22 07:09

Svante