I am interested in using OCaml or Haskell to develop an engine for statistical computing. This functionality is supposed to work on data that is going to be provided by a model driven, Object Oriented information system. The whole thing needs to scale up and out.
I can see a lot of benefits in using Haskell for example, but getting the data in an out of the Haskell code is tricky. There are always out of the box options like C/C++ interfaces or JNI, but in an architecture which is supposed to scale, I find these approaches problematic and error prone.
Considering FP is on the rise, how do people integrate these languages into widely used languages, hence technologies such as Java? I have been using ZeroMQ and Protocol Buffers for Eiffel to Java integration for example, but are there any options which has proven to be stable and high performance?
Ps: Stackoverflow warns me that this question appears subjective, but I am asking about actual technical solutions to connect different runtimes. I have no intention of discussing pros/cons of any language or paradigm.
This is primarily achieved in Java using functional interfaces, which are target types for lambda expressions and method references. Typically, any interface with a single abstract method can serve as a functional interface. So, we can define a functional interface quite easily.
Functional Programming in Java teaches Java developers how to incorporate the most powerful benefits of functional programming into new and existing Java code. You'll learn to think functionally about coding tasks in Java and use FP to make your applications easier to understand, optimize, maintain, and scale.
Functional programming is a programming style in which computations are codified as functional programming functions. These are mathematical function-like constructs (e.g., lambda functions) that are evaluated in expression contexts.
The Functional Java library is an open source library meant to facilitate functional programming in Java. The library provides lots of basic and advanced programming abstractions commonly used in Functional Programming. Much of the library's functionality revolves around the F interface.
Have you considered using Scala? It supports functional programming on a JVM platform. You could integrate it with Java, but you might find that is not needed.
You may also find it is faster than Haskell, esp. with tighter integration with Java.
http://benchmarksgame.alioth.debian.org/u64q/which-programs-are-fastest.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With