News

Microsoft's New Programming Language for Excel Now Turing Complete

Microsoft, which calls its Excel spreadsheet a programming language, reports that an effort called LAMBDA to make it even more of a programming language is paying off, recently being deemed Turing complete.

Being Turing complete is the litmus test of a full-fledged programming language, marking the ability to imitate a Turing machine. According to one definition, that means, "A programming language is Turing complete if you can implement any possible algorithm with it."

And that's exactly what LAMBDA can now do.

LAMBDA
[Click on image for larger view.] LAMBDA (source: Microsoft).

"You can now, in principle, write any computation in the Excel formula language," said Microsoft researchers in a Jan. 25 blog post.

To get there, researchers at the Calc Intelligence project addressed two shortcomings to the LAMBDA project, which is conducted in coordination with the Excel team and which was first announced early last month. They are:

  • The Excel formula language supported only scalar values like numbers, strings and Booleans
  • It didn't let users define new functions

While researchers were at first skeptical that LAMBDA could be of interest to programming language enthusiasts but actually prove to be too hard for everyday users, they say early community response has been encouraging. Users have taken LAMBDA and applied it to various use cases, some of which were never even envisioned by the team.

"Moreover, even if it takes greater skill and knowledge to author a lambda, it takes no extra skill to call it," researchers said. "LAMBDA allows skilled authors to extend Excel with application-domain-specific functions that appear seamlessly part of Excel to their colleagues, who simply call them.

"It will be interesting to see how users continue to experiment with and apply not only LAMBDA but also data types and dynamic arrays. We believe these new functional programming features will transform how people make decisions with Excel."

LAMBDA in Animated Action
[Click on image for larger, animated GIF view.] LAMBDA in Animated Action (source: Microsoft).

And there is certainly a large audience of both programmers and coders, as Microsoft claims "Excel formulas are written by an order of magnitude more users than all the C, C++, C#, Java, and Python programmers in the world combined."

At this stage, LAMBDA still has some implementation issues to be worked through in future development, which will also see plenty of other enhancements.

"In the short term, we expect to see fully nestable arrays and efficient implementations of array-processing combinators, such as MAP and REDUCE, that take lambda functions as their arguments," researchers said. "Beyond that, we hope to define functions not just by a single formula but by a whole worksheet, so-called sheet-defined functions, or even elastic sheet-defined functions. In practical terms, sheet-defined functions will 'go with the flow' of typical spreadsheet design by allowing users to define a larger function via multiple formulas spread out over multiple cells."

The lengthy Jan. 25 post goes into great technical detail that might be of interest to math aficionados and programmers. There's also a video that explains more. To actually use it, you have to be a member of the Insiders: Beta program.

Note that LAMBDA isn't the only project out there trying to put more "programming" goodness into the hands of Excel users, who write macros in the Visual Basic for Applications variant of VB using the Visual Basic Editor (VBE). For one such example, we last year reported on the Rubberduck project that seeks to "Bring the VBE into this century!"

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube