But guess who is the leader ? The big daddy, of course. Microsoft has unleashed the LINQ framework which will be supported by upcoming versions of C# 3.0 and Visual Basic 9. Erik Meijer has hit it right on the nail in LtU - Functional Programming Has Reached The Masses - It's Called Visual Basic. In his confessions, Erik notes
After a long journey through theoretical computer science, database theory, functional programming, and scripting, abstract concepts such a monoids, lambda-expression, and comprehensions have finally reached the day to day world of ordinary programmers. The LINQ framework effectively introduces monad comprehensions into the upcoming versions of C# 3.0 and Visual Basic 9.
LINQ defines query operators for declarative traversal, filter, projection operations over abstract collections (based on
IEnumerable<T>). The query interface extends seamlessly over both XML and SQL data as this overview document from Microsoft states
The query operators over XML (XLinq) use an efficient, easy-to-use in-memory XML facility to provide XPath/XQuery functionality in the host programming language. The query operators over relational data (DLinq) build on the integration of SQL-based schema definitions into the CLR type system. This integration provides strong typing over relational data while retaining the expressive power of the relational model and the performance of query evaluation directly in the underlying store.
In today's application development environment, we use Relational databases for persistence, Objects for implementing business logic and XML in the presentation tier - the infamous ROX triangle of Erik. By offering all of the three paradigms within the same framework, LINQ promises to unify all the three data models for the application developer. Under the hood its all monads and comprehensions, however, the application programmer uses his favourite SQL like syntax
Dim expr As IEnumerable(Of String) = _
Select s.ToUpper() _
From s in names _
Where s.Length = 5 _
Order By s
Along with .NET providing seamless functional programming capabilities uniformly over C# 3.0 and Visual Basic 9, modern languages like Ruby, Python and Scala also have lots to offer in the game. Programmers at large are getting to see the daylight of the elegance of functional programming through the monads, closures, meta programming and comprehensions. Despite the fact that each of these have been around for years, locked up in the functional programming community and discussed by a handful in LtU, they are expected to be part of mainstream programming very shortly. The question, however, is that, is the programming community ready for this ? In one of my earlier posts, I had expressed the concern over the lack of knowledge on the basic principles of functional languages like recursion, higher order functions, function currying, closures amongst the myriads of programmers coming out of CS schools. I think it's time the grad schools shell themselves out of their Java clothing and go back to the first principles that SICP has preached for ages.