Module(:name, false, false)can be used to create amodulethat contains no names (it does not importBaseorCoreand does not contain a reference to itself). ([#40110, #42154])@inlineand@noinlineannotations can be used within a function body to give an extra hint about the inlining cost to the compiler. ([#41312])@inlineand@noinlineannotations can now be applied to a function callsite or block to enforce the involved function calls to be (or not to be) inlined. ([#41312])- The default behavior of observing
@inboundsdeclarations is now an option viaautoin--check-bounds=yes|no|auto([#41551]) - New function
eachsplit(str)for iteratively performingsplit(str). ∀,∃, and∄are now allowed as identifier characters ([#42314]).try-blocks can now optionally have anelse-block which is executed right after the main body only if no errors were thrown. ([#42211])
- Newly created Task objects (
@spawn,@async, etc.) now adopt the world-age for methods from their parent Task upon creation, instead of using the global latest world at start. This is done to enable inference to eventually optimize these calls. Places that wish for the old behavior may useBase.invokelatest. ([#41449]) @timeand@timevnow take an optional description to allow annotating the source of time reports. i.e.@time "Evaluating foo" foo()([#42431])- New
@showtimemacro to show both the line being evaluated and the@timereport ([#42431])
- The LLVM-based compiler has been separated from the run-time library into a new library,
libjulia-codegen. It is loaded by default, so normal usage should see no changes. In deployments that do not need the compiler (e.g. system images where all needed code is precompiled), this library (and its LLVM dependency) can simply be excluded ([#41936]).
- New option
--strip-metadatato remove docstrings, source location information, and local variable names when building a system image.
hardlink(src, dst)can be used to create hard links. ([#41639])diskstat(path=pwd())can be used to return statistics about the disk. ([#42248])
@test_throws "some message" triggers_error()can now be used to check whether the displayed error text contains "some message" regardless of the specific exception type. Regular expressions, lists of strings, and matching functions are also supported. ([#41888])@testset foo()can now be used to create a test set from a given function. The name of the test set is the name of the called function. The called function can contain@testand other@testsetdefinitions, including to other function calls, while recording all intermediate test results. ([#42518])
rangeaccepts eitherstoporlengthas a sole keyword argument ([#39241])precisionandsetprecisionnow accept abasekeyword ([#42428]).- The
lengthfunction on certain ranges of certain specific element types no longer checks for integer overflow in most cases. The new functionchecked_lengthis now available, which will try to use checked arithmetic to error if the result may be wrapping. Or use a package such as SaferIntegers.jl when constructing the range. ([#40382]) - TCP socket objects now expose
closewritefunctionality and support half-open mode usage ([#40783]). - Intersect returns a result with the eltype of the type-promoted eltypes of the two inputs ([#41769]).
Iterators.countfromnow accepts any type that defines+. ([#37747])
- A new macro
@time_importsfor reporting any time spent importing packages and their dependencies ([#41612])
- Now uses
textwidthfor formatting%sand%cwidths ([#41085]).
- Profiling now records sample metadata including thread and task.
Profile.print()has a newgroupbykwarg that allows grouping by thread, task, or nested thread/task, task/thread, andthreadsandtaskskwargs to allow filtering. Further, percent utilization is now reported as a total or per-thread, based on whether the thread is idle or not at each sample.Profile.fetch()by default strips out the new metadata to ensure backwards compatibility with external profiling data consumers, but can be included with theinclude_metakwarg. ([#41742])
RadioMenunow supports optionalkeybindingsto directly select options ([#41576]).?(x, yfollowed by TAB displays all methods that can be called with argumentsx, y, .... (The space at the beginning prevents entering help-mode.)MyModule.?(x, ylimits the search toMyModule. TAB requires that at least one argument have a type more specific thanAny; use SHIFT-TAB instead of TAB to allow any compatible methods.
- The standard log levels
BelowMinLevel,Debug,Info,Warn,Error, andAboveMaxLevelare now exported from the Logging stdlib ([#40980]).
- Added function
isequal_normalizedto check for Unicode equivalence without explicitly constructing normalized strings ([#42493]). - The
Unicode.normalizefunction now accepts achartransformkeyword that can be used to supply custom character mappings, and aUnicode.julia_chartransformfunction is provided to reproduce the mapping used in identifier normalization by the Julia parser ([#42561]).