- A new keyword argument
usings::Bool
has been added tonames
. By using this, we can now find all the names available in moduleA
bynames(A; all=true, imported=true, usings=true)
. ([#54609]) - the
@atomic(...)
macro family supports now the reference assignment syntax, e.g.@atomic :monotonic v[3] += 4
modifiesv[3]
atomically with monotonic ordering semantics. ([#54707]) The supported syntax allows- atomic fetch (
x = @atomic v[3]
), - atomic set (
@atomic v[3] = 4
), - atomic modify (
@atomic v[3] += 2
), - atomic set once (
@atomiconce v[3] = 2
), - atomic swap (
x = @atomicswap v[3] = 2
), and - atomic replace (
x = @atomicreplace v[3] 2=>5
).
- atomic fetch (
-
When methods are replaced with exactly equivalent ones, the old method is no longer deleted implicitly simultaneously, although the new method does take priority and become more specific than the old method. Thus if the new method is deleted later, the old method will resume operating. This can be useful to mocking frameworks (such as in SparseArrays, Pluto, and Mocking, among others), as they do not need to explicitly restore the old method. While inference and compilation still must be repeated with this, it also may pave the way for inference to be able to intelligently re-use the old results, once the new method is deleted. ([#53415])
-
Macro expansion will no longer eagerly recurse into into
Expr(:toplevel)
expressions returned from macros. Instead, macro expansion of:toplevel
expressions will be delayed until evaluation time. This allows a later expression within a given:toplevel
expression to make use of macros defined earlier in the same:toplevel
expression. ([#53515])
-
Generated LLVM IR now uses actual pointer types instead of passing pointers as integers. This affects
llvmcall
: Inline LLVM IR should be updated to usei8*
orptr
instead ofi32
ori64
, and remove unneededptrtoint
/inttoptr
conversions. For compatibility, IR with integer pointers is still supported, but generates a deprecation warning. ([#53687]) -
A new exception
FieldError
is now introduced to raise/handlegetfield
exceptions. Previouslygetfield
exception was captured by fallback generic exceptionErrorException
. Now thatFieldError
is more specificgetfield
related exceptions that can occur should useFieldError
exception instead. ([#54504])
- The
-m/--module
flag can be passed to run themain
function inside a package with a set of arguments. Thismain
function should be declared using@main
to indicate that it is an entry point. - Enabling or disabling color text in Julia can now be controlled with the
NO_COLOR
orFORCE_COLOR
environment variables. ([#53742]). --project=@temp
starts Julia with a temporary environment.- New
--trace-compile-timing
option to report how long each method reported by--trace-compile
took to compile, in ms. ([#54662])
logrange(start, stop; length)
makes a range of constant ratio, instead of constant step ([#39071])- The new
isfull(c::Channel)
function can be used to check ifput!(c, some_value)
will block. ([#53159]) waitany(tasks; throw=false)
andwaitall(tasks; failfast=false, throw=false)
which wait multiple tasks at once ([#53341]).uuid7()
creates an RFC 9652 compliant UUID with version 7 ([#54834]).
invmod(n, T)
whereT
is a native integer type now computes the modular inverse ofn
in the modular integer ring thatT
defines ([#52180]).invmod(n)
is an abbreviation forinvmod(n, typeof(n))
for native integer types ([#52180]).replace(string, pattern...)
now supports an optionalIO
argument to write the output to a stream rather than returning a string ([#48625]).sizehint!(s, n)
now supports an optionalshrink
argument to disable shrinking ([#51929]).- New function
Docs.hasdoc(module, symbol)
tells whether a name has a docstring ([#52139]). - New function
Docs.undocumented_names(module)
returns a module's undocumented public names ([#52413]). - Passing an
IOBuffer
as a stdout argument forProcess
spawn now works as expected, synchronized withwait
orsuccess
, so aBase.BufferStream
is no longer required there for correctness to avoid data races ([#52461]). - After a process exits,
closewrite
will no longer be automatically called on the stream passed to it. Callwait
on the process instead to ensure the content is fully written, then callclosewrite
manually to avoid data-races. Or use the callback form ofopen
to have all that handled automatically. @timed
now additionally returns the elapsed compilation and recompilation time ([#52889])filter
can now act on aNamedTuple
([#50795]).tempname
can now take a suffix string to allow the file name to include a suffix and include that suffix in the uniquing checking ([#53474])RegexMatch
objects can now be used to constructNamedTuple
s andDict
s ([#50988])
gcdx(0, 0)
now returns(0, 0, 0)
instead of(0, 1, 0)
([#40989]).
rank
can now take aQRPivoted
matrix to allow rank estimation via QR factorization ([#54283]).- Added keyword argument
alg
toeigen
,eigen!
,eigvals
andeigvals!
for self-adjoint matrix types (i.e., the type unionRealHermSymComplexHerm
) that allows one to switch between different eigendecomposition algorithms ([#49355]). - Added a generic version of the (unblocked) pivoted Cholesky decomposition
(callable via
cholesky[!](A, RowMaximum())
) ([#54619]).
- Using the new
usings=true
feature of thenames()
function, REPL completions can now complete names that have been explicitlyusing
-ed. ([#54610]) - REPL completions can now complete input lines like
[import|using] Mod: xxx|
e.g. completeusing Base.Experimental: @op
tousing Base.Experimental: @opaque
. ([#54719]) - the REPL will now warn if it detects a name is being accessed from a module which does not define it (nor has a submodule which defines it),
and for which the name is not public in that module. For example,
map
is defined in Base, and executingLinearAlgebra.map
in the REPL will now issue a warning the first time occurs. ([#54872])