Paul Krill
Editor at Large

Lambdascript adds functional programming to Python

news
Jan 11, 20172 mins

The language project, still in the alpha stage, works with Python expressions and emphasizes literate programming

A computer desktop with the word Python screens monitors code coding
Credit: Acid Pix

Lambdascript, a pure functional language built atop Python 3, provides a bridge between Python and functional programming, in yet another nod to a software development paradigm that has been attracting plenty of attention lately.

The Haskell-influenced language uses several Python features and benefits from modules written in Python, according to the project’s GitHub page. “Once a public version [is] released, it should be able to compile very well-written modules to be used in pure Python programs — or even in other Lambdascript programs,” the documentation states. The language is presently in an alpha release stage.

Set to work with either CPython3 or PyPy3 implementations of the language, Lambdascript emphasizes literate programming, with a full program being a Markdown document and lexical binding inside each block of code in the document. Tail-recursion support is featured along with currying of functions. “Pure Python can be [embedded] in the Markdown document by using fenced code blocks and indicating python as the language of the block,” the GitHub repo states. “Any other block of code will be interpreted as Lambdascript code.”

Python has become the subject of much experimentation, with several efforts transpiling it to JavaScript. Other projects have been launched to boost the language’s performance. And Google last week detailed Grumpy, which transpiles Python code into Go.

An organizer of the Silicon Valley Python Meetup, Python programmer Glen Jarvis, said he saw value in Lamdbascript.  “On first glance, yes I do. If, for no other reason, than to better communicate and learn functional programming paradigms using the familiar context of Python.”

Functional programming, which can enable better-structured code while requiring developers to change their perspective on coding, has become popular of late. Languages like Scala, F#, Clojure, and even Java have accommodated functional capabilities, and functional programming has emerged in Python with Coconut, a Python dialect.

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