Julia v1.13 Release Notes
New language features
- New
Base.@acquire
macro for a non-closure version ofBase.acquire(f, s::Base.Semaphore)
, like@lock
. (#56845) - The character U+1F8B2 (RIGHTWARDS ARROW WITH LOWER HOOK), newly added by Unicode 16, is now a valid operator with arrow precedence, accessible as
\hookunderrightarrow
at the REPL. ([JuliaLang/JuliaSyntax.jl#525], #57143)
Language changes
mod(x::AbstractFloat, -Inf)
now returnsx
(as long asx
is finite), this aligns with C standard and
is considered a bug fix (#47102)
- The
hash
algorithm and its values have changed. Mosthash
specializations will remain correct and require no action. Types that reimplement the core hashing logic independently, such as some third-party string packages do, may require a migration to the new algorithm. (#57509)
Compiler/Runtime improvements
Command-line option changes
- The option
--sysimage-native-code=no
has been deprecated.
Multi-threading changes
- A new
AbstractSpinLock
is defined withSpinLock <: AbstractSpinLock
(#55944). - A new
PaddedSpinLock <: AbstractSpinLock
is defined. It has extra padding to avoid false sharing (#55944). - New types are defined to handle the pattern of code that must run once per process, called a
OncePerProcess{T}
type, which allows defining a function that should be run exactly once the first time it is called, and then always return the same result value of typeT
every subsequent time afterwards. There are alsoOncePerThread{T}
andOncePerTask{T}
types for similar usage with threads or tasks. ([#TBD])
Build system changes
New library functions
ispositive(::Real)
andisnegative(::Real)
are provided for performance and convenience (#53677).- Exporting function
fieldindex
to get the index of a struct's field (#58119).
New library features
fieldoffset
now also accepts the field name as a symbol asfieldtype
already did (#58100).sort(keys(::Dict))
andsort(values(::Dict))
now automatically collect, they previously threw (#56978).Base.AbstractOneTo
is added as a supertype of one-based axes, withBase.OneTo
as its subtype (#56902).takestring!(::IOBuffer)
removes the content from the buffer, returning the content as aString
.
Standard library changes
JuliaSyntaxHighlighting
LinearAlgebra
Profile
REPL
- The display of
AbstractChar
s in the main REPL mode now includes LaTeX input information like what is shown in help mode (#58181).
Test
- Test failures when using the
@test
macro now show evaluated arguments for all function calls (#57825, #57839).
InteractiveUtils
- Introspection utilities such as
@code_typed
,@which
and@edit
now accept type annotations as substitutes for values, recognizing forms such asf(1, ::Float64, 3)
or evensum(::Vector{T}; init = ::T) where {T<:Real}
. Type-annotated variables as inf(val::Int; kw::Float64)
are not evaluated if the type annotation provides the necessary information, making this syntax compatible with signatures found in stacktraces (#57909, #58222).