News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 
Download Current Issue
ISSUE 2/1/2010 PDF

Need Back Issues?
DOWNLOAD HERE

Receive the print Edition?


 
blogs tab
Visual Studio 2010 Release Candidate Available Today
A Visual Studio 2010 release candidate is available on MSDN.
02/09/2010 09:45 AM EST

Is Microsoft eyeing Office subscription pricing?
Microsoft may be preparing to offer a new Office pricing option called "union," which charges the same for cloud as on-premises.
02/01/2010 09:38 AM EST

Facebook rewrites PHP runtime
Facebook is about to open source its own PHP runtime, written from scratch for speed.
01/30/2010 08:53 PM EST

 

Events calendar tab
2/9/2010 to 2/13/2010
San Francisco
IDG World Expo

2/10/2010 to 2/12/2010
San Francisco
BZ Media

2/17/2010 to 2/25/2010
Atlanta
Python Software Foundation

2/19/2010 to 2/20/2010
Los Angeles
SCALE

2/21/2010 to 2/24/2010
Las Vegas
IBM


 
SD TIMES BLOG
ahandy

Everyone’s talking about Haskell

by Alex Handy 07/27/2009 01:15 PM EST

Haskell is a purely functional language. Because it is based on Lambda calculus, Haskell programs can be provably reliable. But they must also be written in drastically different ways than traditional applications. Despite its distance from traditional programming, and its relative lack of common use, Haskell has become one of the most talked-about languages on the Internet.

According to the programming popularity tracking website Langpop.com, Haskell ranks near the bottom of lists tracking the use of 32 different languages. But on that site's weighted discussion frequency chart, Haskell shows up as the sixth most talked-about language. That means developers aren't yet using Haskell regularly, but they are certainly evaluating and considering the language.

Haskell was first defined in 1990 after an explosion in functional languages caused some intrepid developers to push for standards amongst functional languages. Seven years later, Haskell98 was the first full implementation of the language to be released. As a purely functional language, Haskell requires a different programming mindset than traditional languages. Variables in Haskell, for example, cannot be changed; rather, programs pass values into functions and receive new values as the
output. The new values are often passed directly into other functions. This immutability eliminates the side effects that manifest as most of the bugs in traditional programs.

Don Stewart has been writing in Haskell for 10 years, and he writes with it in his day job as a programmer at Galois, a decade-old consulting company. Stewart said that Haskell is finding its own niches.

“There seem to be three major areas Haskell is getting used in industry, going by the experience reports at the CUFP (Commercial Users of Functional Programming) workshop," he said.

"Firstly, where correctness matters—when failure of a component is unacceptable. If there is some serious consequence to the enterprise if software fails, we want to do all we can as programmers to ensure before we go live that the system is going to work. Here Haskell really shines: the careful, precise control of side effects, modern static typing, and hooking up with formal verification tools give us a fighting chance of establishing, before we launch, that the system is going to meet spec."

Secondly, Stewart said Haskell is used “for domain-specific languages. Small languages are common, arising all over the industrial landscape, and Haskell's pretty much unique in its support for embedding domain-specific languages easily. Credit Suisse, for example, uses a Haskell [embedded domain-specific language] called Paradise to generate financial models. Non-programmers write Paradise code, which just happens to be Haskell.

"Eaton [Corp.] uses a Haskell EDSL called Atom to generate control systems for the hydraulics in large vehicles, like trucks and buses. They had an order-of-magnitude reduction in their code base when moving from C++ to Atom, as so much of the code boilerplate is now automated, and it makes it possible to verify the code before it goes into the vehicle.”

Finally, said Stewart, Haskell is used when there is a need “for multicore parallelism. This is a hot new area, as multicore has become widespread. GHC [the main Haskell compiler] has an SMP runtime, with support for three distinct types of concurrency and parallelism. [It supports] lightweight threads, communicating through transactional memory; semi-implicit parallelism via "sparks"; and a new extension: nested-data parallel array programming. On top of these, a wealth of concurrency abstractions are implemented [such as] channels, actors, message passing, etc.”

Jason Dusek, a freelance software development consultant, started writing Haskell applications three years ago. He said that within the past year and half, the number of libraries available for Haskell has exploded.

"There is a big push to organize more libraries and to churn out libraries," he said. "There were around 11,000 modules on Hackage [a Haskell wiki] last time I checked."

Dusek taught a class for experienced programmers to learn Haskell at the San Francisco hacker collective, Noisebridge, earlier this year. He said that he learned a lot by teaching traditional software developers about the basics of functional programming.

There are books geared toward teaching Haskell to the inexperienced. "Real World Haskell," written by Stewart, John Goerzen and Bryan O'Sullivan, was released last November.

Both Dusek and Stewart said that the Haskell community is more amenable to live, 24x7 tech support, thanks to a bustling online presence. “The community itself has grown a lot," said Stewart.

"The #haskell IRC channel [on Freenode] averages about 650 users at a time, double what it was a year ago." That chat room is also more popular than those of Java and C# on the same IRC network.

“All this centralization and organization has made it easier to teach, learn and share, and in turn makes it easier to start using Haskell in new projects,” said Stewart.

Currently rated 4.5 by 24 people

  • Currently 4.458333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Share this link: http://www.sdtimes.com/blog/1486

Tags:

Comments

Add comment


 
  Country flag

biuquote
  • Comment
  • Preview
Loading