- It is now possible to assign to bindings in another module using
setproperty!(::Module, ::Symbol, x). ([#44137]) - Slurping in assignments is now also allowed in non-final position. This is
handled via
Base.split_rest. ([#42902]) - Character literals now support the same syntax allowed in string literals; i.e. the syntax can
represent invalid UTF-8 sequences as allowed by the
Chartype ([#44989]). - Nested combinations of tuples and named tuples of symbols are now allowed as type parameters ([#46300]).
- New builtins
getglobal(::Module, ::Symbol[, order])andsetglobal!(::Module, ::Symbol, x[, order])for reading from and writing to globals.getglobalshould now be preferred for accessing globals overgetfield. ([#44137]) - The
@invokemacro introduced in 1.7 is now exported. Additionally, it now usesCore.Typeof(x)rather thanAnywhen a type annotation is omitted for an argumentxso that types passed as arguments are handled correctly. ([#45807]) - The
invokelatestfunction and@invokelatestmacro introduced in 1.7 are now exported. ([#45831])
- The known quadratic behavior of type inference is now fixed and inference uses less memory in general. Certain edge cases with auto-generated long functions (e.g. ModelingToolkit.jl with partial differential equations and large causal models) should see significant compile-time improvements. ([#45276], [#45404])
- Non-concrete call sites can now be union-split to be inlined or statically-resolved even
if there are multiple dispatch candidates. This may improve runtime performance in certain
situations where object types are not fully known statically but mostly available at runtime
(as like Julia-level type inference implementation itself) by statically resolving
@nospecialize-d call sites and avoiding excessive compilation. ([#44512]) - All the previous usages of
@pure-macro inBasehas been replaced with the preferredBase.@assume_effects-based annotations. ([#44776]) invoke(f, invokesig, args...)calls to a less-specific method than would normally be chosen forf(args...)are no longer spuriously invalidated when loading package precompile files. ([#46010])
- In Linux and Windows,
--threads=autonow tries to infer usable number of CPUs from the process affinity which is set typically in HPC and cloud environments ([#42340]). --math-mode=fastis now a no-op ([#41638]). Users are encouraged to use the @fastmath macro instead, which has more well-defined semantics.- The
--threadscommand-line option now acceptsauto|N[,auto|M]whereMspecifies the number of interactive threads to create (autocurrently means 1) ([#42302]). - New option
--heap-size-hint=<size>gives a memory hint for triggering greedy garbage collection. The size might be specified in bytes, kilobytes(1000k), megabytes(300M), gigabytes(1.5G)
Threads.@spawnnow accepts an optional first argument::defaultor:interactive. An interactive task desires low latency and implicitly agrees to be short duration or to yield frequently. Interactive tasks will run on interactive threads, if any are specified when Julia is started ([#42302]).
Iterators.flatmapwas added ([#44792]).- New helper
Splat(f)which acts likex -> f(x...), with pretty printing for inspecting which functionfwas originally wrapped. ([#42717]) - New
pkgversion(m::Module)function to get the version of the package that loaded a given module, similar topkgdir(m::Module). ([#45607]) - New function
stack(x)which generalisesreduce(hcat, x::Vector{<:Vector})to any dimensionality, and allows any iterators of iterators. Methodstack(f, x)generalisesmapreduce(f, hcat, x)and is efficient. ([#43334])
- A known concurrency issue of
iteratemethods onDictand other derived objects such askeys(::Dict),values(::Dict), andSetis fixed. These methods ofiteratecan now be called on a dictionary or set shared by arbitrary tasks provided that there are no tasks mutating the dictionary or set ([#44534]). - Predicate function negation
!fnow returns a composed function(!) ∘ finstead of an anonymous function ([#44752]). RoundFromZeronow works for non-BigFloattypes ([#41246]).Dictcan be now shrunk manually bysizehint!([#45004]).@timenow separates out % time spent recompiling invalidated methods ([#45015]).eachslicenow works over multiple dimensions;eachslice,eachrowandeachcolreturn aSlicesobject, which allows dispatching to provide more efficient methods ([#32310]).@kwdefis now exported and added to the public API ([#46273])
- The methods
a / bandb \ awithaa scalar andba vector, which were equivalent toa * pinv(b), have been removed due to the risk of confusion with elementwise division ([#44358]). - We are now wholly reliant on libblastrampoline (LBT) for calling BLAS and LAPACK. OpenBLAS is shipped by default, but building the system image with other BLAS/LAPACK libraries is not supported. Instead, it is recommended that the LBT mechanism be used for swapping BLAS/LAPACK with vendor provided ones. ([#44360])
lunow supports a new pivoting strategyRowNonZero()that chooses the first non-zero pivot element, for use with new arithmetic types and for pedagogy ([#44571]).normalize(x, p=2)now supports any normed vector spacex, including scalars ([#44925]).
- Error messages for bad format strings have been improved, to make it clearer what & where in the format string is wrong. ([#45366])
randnandrandexpnow work for anyAbstractFloattype definingrand([#44714]).
-
Meta-enow opens the current input in an editor. The content (if modified) will be executed upon existing the editor. -
The contextual module which is active at the REPL can be changed (it is
Mainby default), via theREPL.activate(::Module)function or via typing the module in the REPL and pressing the keybinding Alt-m ([#33872]).
- New fail-fast mode for testsets that will terminate the test run early if a failure or error occurs.
Set either via the
@testsetkwargfailfast=trueor by setting env varJULIA_TEST_FAILFASTto"true"i.e. in CI runs to request the job failure be posted eagerly when issues occur ([#45317])
- The package environment (active project,
LOAD_PATH,DEPOT_PATH) are now propagated when adding local workers (e.g. withaddprocs(N::Int)or through the--procs=Ncommand line flag) ([#43270]). addprocsfor local workers now accept theenvkeyword argument for passing environment variables to the workers processes. This was already supported for remote workers ([#43270]).
graphemes(s, m:n)returns a substring of them-th ton-th graphemes ins([#44266]).
- DelimitedFiles has been promoted from being a standard library to a separate package. It now has to be explicitly installed to be used.
- Unexported
splatis deprecated in favor of exportedSplat, which has pretty printing of the wrapped function. ([#42717])
- Printing of
MethodErrorand methods (such as frommethods(my_func)) are now prettified and color consistent with printing of methods in stacktraces. ([#45069])