public
is a new keyword. Symbols marked withpublic
are considered public API. Symbols marked withexport
are now also treated as public API. The difference betweenpublic
andexport
is thatpublic
names do not become available whenusing
a package/module ([#50105]).ScopedValue
implement dynamic scope with inheritance across tasks ([#50958]).- The new macro
Base.Cartesian.@ncallkw
is analogous toBase.Cartesian.@ncall
, but allows to add keyword arguments to the function call ([#51501]). - Support for Unicode 15.1 ([#51799]).
- A new
AbstractString
type,AnnotatedString
, is introduced that allows for regional annotations to be attached to an underlying string. This type is particularly useful for holding styling information, and is used extensively in the newStyledStrings
standard library. There is also a newAnnotatedChar
type, that is the equivalent newAbstractChar
type.
- During precompilation, the
atexit
hooks now run before saving the output file. This allows users to safely tear down background state (such as closing Timers and sending disconnect notifications to heartbeat tasks) and cleanup other resources when the program wants to begin exiting. - Code coverage and malloc tracking is no longer generated during the package precompilation stage.
Further, during these modes pkgimage caches are now used for packages that are not being tracked.
Meaning that coverage testing (the default for
julia-actions/julia-runtest
) will by default use pkgimage caches for all other packages than the package being tested, likely meaning faster test execution. ([#52123])
- Updated GC heuristics to count allocated pages instead of individual objects ([#50144]).
- A new
LazyLibrary
type is exported fromLibdl
for use in building chained lazy library loads, primarily to be used within JLLs ([#50074]). - Added a support for annotating
Base.@assume_effects
on code block ([#52400]).
- The entry point for Julia has been standardized to
Main.main(ARGS)
. This must be explicitly opted into using the@main
macro (see the docstring for further details). When opted-in, and julia is invoked to run a script or expression (i.e. usingjulia script.jl
orjulia -e expr
), julia will subsequently run theMain.main
function automatically. This is intended to unify script and compilation workflows, where code loading may happen in the compiler and execution ofMain.main
may happen in the resulting executable. For interactive use, there is no semantic difference between defining amain
function and executing the code directly at the end of the script ([50974]).
in!(x, s::AbstractSet)
will return whetherx
is ins
, and insertx
ins
if not.- The new
Libc.mkfifo
function wraps themkfifo
C function on Unix platforms ([#34587]). hardlink(src, dst)
can be used to create hard links ([#41639]).diskstat(path=pwd())
can be used to return statistics about the disk ([#42248]).copyuntil(out, io, delim)
andcopyline(out, io)
copy data into anout::IO
stream ([#48273]).eachrsplit(string, pattern)
iterates split substrings right to left.Sys.username()
can be used to return the current user's username ([#51897]).
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]).
- A new standard library for handling styling in a more comprehensive and structured way ([#49586]).
- The new
Faces
struct serves as a container for text styling information (think typeface, as well as color and decoration), and comes with a framework to provide a convenient, extensible (viaaddface!
), and customisable (with a user'sFaces.toml
andloadfaces!
) approach to styled content ([#49586]). - The new
@styled_str
string macro provides a convenient way of creating aAnnotatedString
with various faces or other attributes applied ([#49586]).
cbrt(::AbstractMatrix{<:Real})
is now defined and returns real-valued matrix cube roots of real-valued matrices ([#50661]).eigvals/eigen(A, bunchkaufman(B))
andeigvals/eigen(A, lu(B))
, which utilize the Bunchkaufman (LDL) and LU decomposition ofB
, respectively, now efficiently compute the generalized eigenvalues (eigen
: and eigenvectors) ofA
andB
. Note: The second argument is the output ofbunchkaufman
orlu
([#50471]).
rand
now supports sampling overTuple
types ([#35856], [#50251]).rand
now supports sampling overPair
types ([#28705]).- When seeding RNGs provided by
Random
, negative integer seeds can now be used ([#51416]). - Seedable random number generators from
Random
can now be seeded by a string, e.g.seed!(rng, "a random seed")
([#51527]).
- Tab complete hints now show in lighter text while typing in the repl. To disable
set
Base.active_repl.options.hint_tab_completes = false
([#51229]). - Meta-M with an empty prompt now returns the contextual module of the REPL to
Main
.
- Statistics is now an upgradeable standard library ([#46501]).
pmap
now defaults to using aCachingPool
([#33892]).
tput
is no longer called to check terminal capabilities, it has been replaced with a pure-Julia terminfo parser ([#50797]).
- CI now performs limited automatic typo detection on all PRs. If you merge a PR with a failing typo CI check, then the reported typos will be automatically ignored in future CI runs on PRs that edit those same files ([#51704]).