Julia language improves on multi-threading and consistency

Julia language improves on multi-threading and consistency

Dynamic programming language Julia’s 1.4 release includes a slew of new library features, as well as some changes to its build system, multi-threading, and the language itself.

With the arrival of the new version, the language, which is especially useful for high-performance numerical analysis tasks, now provides a way to address the first element of an integer-indexed collection by using square brackets (as in a[begin]). It also allows quoting symbols such as + in import statements for a more consistent overall behaviour and better warnings.

Structs with all isbits and isbitsunion fields can now be stored inline in arrays, while @async and @spawn now know the $ interpolation syntax to evaluate arguments immediately. Julia’s standard library has been reworked to show valid code if show or repr is called on an undef/UndefInitializer or a 0-dimensional AbstractArray. And to make things more readable, sets are displayed as columns of elements (like dictionaries) in the REPL.

In other library news, there’s now an evalpoly function which is meant to be more flexible than the macro of the same name and will probably take over its role eventually. The Iterators submodule now contains accumulate, takewhile and dropwhile, the latter two of which are constructs that can also be found in Python, Ruby and other languages.

Julia 1.4 lets users compose functions from multiple functions and use splatting for iterable function collections. Other improvements include support for rounding division, using filter on a Tuple, and Rational arguments in gcd, lcm, and gcdx.

Apart from the many additions, the Julia team also decided to deprecate a bit of language syntax to make the language more intuitive. Starting with version 1.4, the (;) syntax for empty block expressions isn’t supported anymore, since it seemed to confuse people more than help them. It isn’t gone for good, however, and the team plans to use the syntax to indicate empty named tuples in the future.

Devs using Julia on Windows should be aware that the team has switched to Inno Setup for their build installer, leading to changed parameters. The command julia-installer.exe /? will get them an overview of the new command line parameters.