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 for Converge360.

comments powered by Disqus

Featured

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

Subscribe on YouTube