Engineers at Google have unveiled , a prototype functional language designed for array processing. Array processing is a cornerstone of the math used in machine learning applications and other computationally intensive work.

The chief goal for the Dex language, according to a released by Google researchers, is to allow programmers to work efficiently and concisely with arrays using a compact, functional syntax.

Existing math-and-stats languages and libraries, such as MATLAB and NumPy, already have widely used array processing techniques and syntaxes, as do more general purpose languages such as Fortran and C. But the paper’s authors were unhappy with the “obfuscated” feel of the former and the “heaviness” of the latter.

Dex, patterned after the Haskell and ML family of languages, uses type information to make writing code for processing arrays both succinct and explicit.  show how the type system works with both regular values (integers and reals) and arrays. Other examples show how to express common problems such as or .

Like or the , Dex can run prewritten programs from the CLI, interactively in a REPL, or by way of a notebook-style interface. The current prototype supports all three modes.

Dex uses the language-compiler framework, which powers many general-purpose languages like and . LLVM is also proving useful for constructing domain-specific languages, or DSLs—languages designed to ease the handling of a deliberately small set of tasks. Other LLVM-powered DSL projects for computational work include , a compiler for DSLs used in neural networks; and , an intermediate language and compiler used for tiled neural networks.

Dex is still early-stage experimental and not officially supported by Google in any capacity. The largest still-missing piece is integration with other languages, where Dex could be used for offloading computationally intensive work (for instance, as libraries like Numba do for Python). The Dex project, which is licensed under the BSD 3-clause license, welcomes contributions and collaboration.