Julia开发人员很高兴地宣布juliav1.6.0的发布,这是1.x系列中的第六个小版本。
New language features
Types written with where syntax can now be used to define constructors, e.g. (Foo{T} where T)(x) = ....
<-- and <--> are now available as infix operators, with the same precedence and associativity as other arrow-like operators (#36666).
Compilation and type inference can now be enabled or disabled at the module level using the experimental macro Base.Experimental.@compiler_options (#37041).
The library name passed to ccall or @ccall can now be an expression involving global variables and function calls. The expression will be evaluated the first time the ccall executes (#36458).
ꜛ (U+A71B), ꜜ (U+A71C) and ꜝ (U+A71D) can now also be used as operator suffixes. They can be tab-completed from ^uparrow, ^downarrow and ^! in the REPL (#37542).
Standalone "dotted" operators now get parsed as Expr(:., :op), which gets lowered to Base.BroadcastFunction(op). This means .op is functionally equivalent to (x...) -> (op).(x...), which can be useful for passing the broadcasted version of an operator to higher-order functions, for example map(.*, A, B) for an elementwise product of two arrays of arrays (#37583).
The syntax import A as B (plus import A: x as y, import A.x as y, and using A: x as y) can now be used to rename imported modules and identifiers (#1255).
Unsigned literals (starting with 0x) which are too big to fit in a UInt128 object are now interpreted as BigInt (#23546).
It is now possible to use ... on the left-hand side of assignments for taking any number of items from the front of an iterable collection, while also collecting the rest, for example a, b... = [1, 2, 3]. This syntax is implemented using Base.rest, which can be overloaded to customize its behavior for different collection types (#37410).