Functional programming has been around from the 1950's. Most modern
programming languages (C++, C#, Java, etc.) have functional features; and they continue to
gradually incorporate the well-proven functional ideas and features
such as generics (parametric polymorphism), higher-order functions, lazy evaluation,
resulting in a combination of imperative, object-oriented and functional
Nonetheless, most mainstream languages (Java, C++, C#, VB) are not functional
as they lack the proper foundation, either because their absorption of functional
ideas is not yet complete, or because these ideas can't be fully or easily incorporated.
One example is the lack of true polymorphism in C++ or straightforward higher-order
functions in Java.
These shortcomings cause significant loss of productivity and come at a high cost:
non-functional programs are more lengthy, more difficult to understand, and
most importantly more costly to develop and maintain. Savings when functional languages
are used are in the range of 20-80% in our experience, also echoed by
the numerous comparative studies and research.
Domain-specific languages (DSLs)
The use of DSLs not only gives a concise syntax to describe the problem at
hand in a less error-prone manner but also promotes the understanding of the underlying
problem domain. Why do we have to deal with pointers, for loops, or static
methods when we are writing a program that computes say the shortest path between
two cities, C1 and C2? Consider the following instead:
find Path in G(V, E) where
first(Path)=C1 and last(Path)=C2
and Path is valid in G(V, E)
and cost(Path) is minimized
The benefits of DSLs are immense: programs in DSLs are much shorter and quicker
to develop (gains of several fold), which improves understanding and maintainability
dramatically. On the other hand, there is a significant one-time cost
of initial development of the DSL.
At IntelliFactory we are experts at functional programming and DSL development.
Contact us to see how we can help your company benefit.