Paul Krill
Editor at Large

Ramda wants to put the function in functional JavaScript

analysis
May 30, 20142 mins

The library will help developers put together an apps from small functions with simple interfaces

Concise, functional programming in JavaScript is the focus of a project in development called Ramda, which is being unveiled this month.

The open source project brings a general-purpose, functional library to JavaScript, which its authors said makes for crisp, reliable code. “Functional programming is about recognizing common patterns across different situations and finding common solutions for dealing with them,” said co-author Scott Sauyet, owner of the Four Winds Software consulting firm. “We try to capture many of these patterns in Ramda.”

Using Ramda, co-developer Michael Hurley, said, should also enable testability, since Ramda methods are stateless and referentially transparent.

While acknowledging there are already functional libraries for JavaScript, such as Underscore, Ramda’s developers said the library’s focus on composing functions would attract developers’ attention. “Since Ramda curries its functions, you can compose functions with very little code. You can also compose with Underscore/Lodash, but that is not really their focus. The lack of automatic currying in those libraries makes function composition a bit awkward,” Hurley said.

Ramda lets developers snap together an application from small functions with simple interfaces, Sauyet said. Using the library should feel as much like JavaScript as possible, according to Ramda’s documentation.

Thus far, Ramda’s developers have mostly focused on data manipulation in development of the library, but they have lately begun to emphasize capabilities related to user interface development. Currently in the equivalent of an alpha stage of release, Ramda is ready for experimental use, but not for production use. “There is still much to do before a 1.0 release, and we have not really developed an overall road map,” Sauyet said. Better documentation, a more complete build system, and possibly different bundles for different usages are on the agenda.

The name Ramda is a pun on “lambda,” as in lambda calculus, the theoretical foundation of the functional programming paradigm, Hurley said. Functional capabilities recently were added to Java via Project Lambda, in version 8 of the venerated enterprise development platform.

This story, “Ramda wants to put the function in functional JavaScript,” was originally published at InfoWorld.com. Get the first word on what the important tech news really means with the InfoWorld Tech Watch blog. For the latest developments in business technology news, follow InfoWorld.com on Twitter.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author