Print

Code Watch: Here comes functional programming



Larry O'Brien
Email
November 11, 2011 —  (Page 1 of 3)
Functional Programming is the Next Big Thing in mainstream development. As I discussed in my previous column, functional programming approaches have slowly become more common in the mainstream, not because programmers have become more interested in Category Theory, but because functional approaches work well with the 21st century's signature advancement in mainstream programming: unit-testing.

But functional programming's further rise is assured by the popularity of C# (whose evolution in recent years has been explicitly influenced by FP); the availability of F# and Scala on the two major VMs; and the prominence of FP in academia (where such mundane questions as syntax, interoperability and learnability are considered "uninteresting"). Functional languages (or, most likely, functional-object hybrid languages) will fill the slot between the browser (where JavaScript is deeply entrenched) and the system (where performance demands and the broad availability of gcc seem to provoke a "better the devil you know" loyalty to C and C++).

In other words, functional programming fits right into the mainstream of corporate development, where legacy codebases are large, programmer productivity must be high across teams with different experience levels, and tooling is important. This is the same place where dynamic languages such as Python and Ruby have been knocking on the door for several years without getting the reception they deserve.

Ruby has certainly crossed the chasm for Web development, and Python has become common in some domains (notably in the field of science), but neither seems to have made deep inroads into general corporate development. One of the major issues in both cases is that neither is native to either .NET's CLR virtual machine or the Java Virtual Machine. While there are ports of the languages onto both the virtual machines, I've become used to hearing library compatibility complaints as an initial response to my questioning if a team has considered them. Whether such compatibility issues would go away with a few hours of configuration tweaking is rarely a conversation that people seem eager to have. F# (in the .NET world) and Scala (on the JVM) don't have to jump through any hoops to use popular libraries. Advantage: native-to-VM languages.



Related Search Term(s): C#, functional programming

Pages 1 2 3 


Share this link: http://sdt.bz/36103
 
Most Read Latest News Blog Resources


Comments


11/14/2011 09:58:10 PM EST

There is no functional programming bandwagon. Functional programming does sometimes influence mainstream programming. But overall, for more than 50 years, mainstream programmers *always* prefer a non-functional language. If you have tried to write non-academic program in a functional language, you'll know that they present all kinds of hassles when dealing with simple things like files and file systems. These things break the "no side effects" principle of functional programming, a principle that doesn't exist in the real world. Functional programming can be good to simplify really complex problems, such as airline ticket pricing and route planning, but from typical business applications, functional programming is much more difficult than with procedural and object-oriented languages.

United Statesdev danke


11/25/2011 05:51:19 PM EST

"21st century's signature contribution to mainstream prograsmming: unit testing." What? Unit testing has been around forever (or at least for the 40 years I have been in the business).

United StatesMark


12/02/2011 01:41:05 PM EST

@Dev: It seems to me that there _is_ an FP bandwagon: the influence in the .NET world is clear, with LINQ being a prime driver of the evolution of the .NET languages. In the Java world, I feel that there is industry motion towards Scala as the best "next Java." @Mark: Yes, unit-testing has been "around" forever, but it has only become a mainstream development practice in the 00s. In the 90s or before, I would be surprised and happy to find a test-suite embedded in a source-code tarball (especially a _unit_ test suite), today, I would be surprised to check out a new codebase and _not_ find such a suite. The shift in expectations about testing and quality is, to me, the "signature" shift in the programming zeitgeist in the 00s. Unit-testing was downright rare back in the days of statically-linked single-entry-point programs.

United StatesLarry O'Brien


12/02/2011 01:58:00 PM EST

@Dev: As to whether FP is "superior" to OOP when it comes to mainstream enterprise development, or only excels in the algorithmic realms, I think that's a _HUGE_ debate that the industry needs to have. My old construction was "LISP has been touted in academia for 40 years and _everyone_ abandons it when they move into industry. Maybe that has some significance?" But as I've tried to say in these 2 columns, it seems to me that "FP approaches" (state externalized into parameters, functional rather than structural composition, etc.) have become more commonplace for totally pragmatic reasons. I think that has "primed the pump" as it were and I think that FP (an old concept) is about to be discovered anew and everyone's going to shout "silver bullet! silver bullet!" Regrettably, what I can anticipate that if some of us with gray hair say "Well, you know, it's fine, but it's not magic..." we're going to be dismissed as "not getting it."

United StatesLarry O'Brien


Add comment


Name*
Email*  
Country     


  • Comment
Loading




close
NEXT ARTICLE
Code Watch: Functional programming's smugness problem
Functional programming techniques are held back by those who practice them being not nice to other people Read More...
 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 

Download Current Issue
MAY 2012 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?


 
blogs tab
Slick...but who needs it?
compilr.com is a well-designed site and the folks behind it seem to have their heart in the right place. But...who needs it?
05/16/2012 12:45 PM EST

How to be a better software developer
Want to be a better developer? You won't get there by mastering an interesting language or learning a new set of APIs.
05/14/2012 12:18 PM EST

Wooing Galatea
Do yourself a favor and check out Galatea 2.2, a wonderful book by novelist Richard Powers.
05/12/2012 07:05 PM EST

The world as story
An artificial-intelligence system at Carnegie Mellon seeks to understand the world by making statements about it.
05/10/2012 06:39 AM EST

The Rise of the Brogrammer, or the Rise of the Sexist Programmer?
Women in Silicon Valley get vocal about sexist ads and campaigns that contribute to a tense work environment.
05/09/2012 03:14 PM EST

Retriever Communications Releases RADE3
Organizations concerned about the growing popularity of bring your own device to work policies may be comforted by the release of RADE3.
05/09/2012 11:46 AM EST

 

Events calendar tab
5/13/2012 to 5/18/2012
Boston
Lean-Kanban University

5/14/2012 to 5/18/2012
Denver
IDUG

5/23/2012 to 5/24/2012
Chicago
IEG

6/3/2012 to 6/7/2012
Orlando
IBM Rational

6/10/2012 to 6/15/2012
Las Vegas
SQE