Technology orientation
Functional programming
Functional programming ideas have been around for at least 50 years. Most modern
programming languages (C++, C#, Java, etc.) have functional elements; in fact the
tendency is to gradually incorporate the well-proven functional ideas and features
such as generics (parametric polymorphism), higher-order functions, lazy evaluation
into these languages, resulting in mixture of imperative, object-oriented and functional
paradigms.
Nevertheless, most languages in heavy use today (Java, C++, C#, VB) are not functional
because they lack the proper foundation, either because their absorption of functional
ideas is not yet complete or because these ideas can not be fully or easily embedded.
A good 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:
modern 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 which is backed by
the numerous studies and research in the effectiveness and expressiveness of various
programming languages.
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.
Learn about Functional Programming
See what Anders Heljsberg, the chief architect of C# has to say on functional programming.
|
|
|
Anders Hejlsberg on LINQ and Functional Programming with Charlie Calvert
In this interview Anders Heljsberg explains why LINQ and functional programming
will change the way we develop applications. He goes back to prototyping LINQ and
how ideas from functional programming helped their team make a leap with the level
of abstraction. He talks about lambda expressions, composability using higher-order
functions, expression trees, meta programming, pure functional programming and concurrency.
Anders: "By incorporating (some of these) functional concepts it actually becomes
possible to create higher level programming models."
|