- An exception stack is maintained on each task to make exception handling
more robust and enable root cause analysis. The stack may be accessed using
the experimental function
Base.catch_stack
(#28878). - The experimental macro
Base.@locals
returns a dictionary of current local variable names and values (#29733).
- Parser inputs ending with a comma are now consistently treated as incomplete. Previously they were sometimes parsed as tuples, depending on whitespace (#28506).
- Spaces were accidentally allowed in broadcast call syntax, e.g.
f. (x)
. They are now disallowed, consistent with normal function call syntax (#29781). - Big integer literals and command syntax (backticks) are now parsed with the name of
the macro (
@int128_str
,@uint128_str
,@big_str
,@cmd
) qualified to refer to theCore
module (#29968). - Using the same name for both a local variable and a static parameter is now an error instead of a warning (#29429).
findall(in(b), a)
now returns aCartesianIndex
whena
is a matrix or a higher-dimensional array, for consistency with otherfindall
methods. UseLinearIndices(a)[findall(in(b), a)]
to get the old behavior, orCartesianIndices(a)[findall(in(b), a)]
to get the new behavior on previous Julia versions ([#30226]).findmin(::BitArray)
andfindmax(::BitArray)
now return aCartesianIndex
whena
is a matrix or a higher-dimensional array, for consistency with for other array types. UseLinearIndices(a)[findmin(a)[2]]
to get the old behavior, orCartesianIndices(a)[findmin(a)[2]]
to get the new behavior on previous Julia versions ([#30102]).- Method signatures such as
f(::Type{T}, ::T) where {T <: X}
andf(::Type{X}, ::Any)
are now considered ambiguous. Previously a bug caused the first one to be considered more specific ([#30160]).
- When a script run in interactive mode (
-i
) throws an error, the REPL now starts after the error is displayed. Previously the REPL only started if the script completed without error (#21233).
splitpath(p::String)
function, which is the opposite ofjoinpath(parts...)
: it splits a filepath into its components (#28156).isnothing(::Any)
function, to check whether something is aNothing
, returns aBool
(#29679).getpid(::Process)
method (#24064).eachrow
,eachcol
andeachslice
functions provide efficient iterators over slices of arrays (#29749).fieldtypes(T::Type)
which return the declared types of the field in type T (#29600).uuid5
has been added to theUUIDs
standard library (#28761).- Predicate functions
Sys.isfreebsd
,Sys.isopenbsd
,Sys.isnetbsd
, andSys.isdragonfly
for detecting BSD systems have been added (#30249). - Internal
Base.disable_library_threading
that sets libraries to use one thread. It executes function hooks that have been registered withBase.at_disable_library_threading
([#30004]).
CartesianIndices
can now be constructed from twoCartesianIndex
esI
andJ
withI:J
(#29440).CartesianIndices
support broadcasting arithmetic (+ and -) with aCartesianIndex
(#29890).copy!
support for arrays, dicts, and sets has been moved to Base from the Future package (#29173).- Channels now convert inserted values (like containers) instead of requiring types to match (#29092).
range
can accept the stop value as a positional argument, e.g.range(1,10,step=2)
(#28708).diff
now supports arrays of arbitrary dimensionality and can operate over any dimension (#29827).- The constructor
BigFloat(::BigFloat)
now respects the global precision setting and always returns aBigFloat
with precision equal toprecision(BigFloat)
(#29127). The optionalprecision
argument to override the global setting is now a keyword instead of positional argument (#29157). - The use of scientific notation when printing
BigFloat
values is now consistent with other floating point types (#29211). Regex
now behave like a scalar when used in broadcasting (#29913).Char
now behaves like a read-only 0-dimensional array (#29819).parse
now allows strings representing integer 0 and 1 for typeBool
(#29980).Base.tail
now works on named tuples (#29595).- The process id is appended to malloc log files in order to track memory allocations of multiple processes (#29969).
Base.julia_cmd
now propagates the--inline=(yes|no)
flag (#29858).Base.@kwdef
can now be used for parametric structs, and for structs with supertypes (#29316).merge(::NamedTuple, ::NamedTuple...)
can now be used with more than 2NamedTuple
s (#29259).Future.copy!
has been moved toBase
(#29178).- New
ncodeunits(c::Char)
method as a fast equivalent toncodeunits(string(c))
(#29153). - New
sort!(::AbstractArray; dims)
method that can sort the array along thedims
dimension (#28902). range
now acceptstop
as a positional argument (#28708).get(A::AbstractArray, (), default)
now returns the result ofA[]
if it can instead of always returning an empty array ([#30270]).parse(Bool, str)
is now supported (#29997).copyto!(::AbstractMatrix, ::UniformScaling)
supports rectangular matrices now (#28790).- In
put!(c::Channel{T}, v)
,v
now gets converted toT
asput!
is being called (#29092). current_project()
now searches the parent directories of a Git repository for aProject.toml
file. This also affects the behavior of the--project
command line option when using the default--project=@.
(#29108).- The
spawn
API is now more flexible and supports taking IOBuffer directly as a I/O stream, converting to a system pipe as needed ([#30278]).
- New
DateTime(::Date, ::Time)
constructor (#29754). TimeZone
now behave like a scalar when used in broadcasting (#30159).
edit
can now be called on a module to edit the file that defines it (#29636).- All compiler-reflection tools (i.e. the
code_
class of functions and macros) now print accurate line number and inlining information in a common style, and take an optional parameter (debuginfo=:default) to control the verbosity of the metadata shown (#29893).
isdiag
andisposdef
forDiagonal
andUniformScaling
(#29638).mul!
,rmul!
andlmul!
methods forUniformScaling
(#29506).Symmetric
andHermitian
matrices now preserve the wrapper when scaled with a number (#29469).- Exponentiation operator
^
now supports raising aIrrational
to anAbstractMatrix
power (#29782).
randperm
andrandcycle
now use the type of their argument to determine the element type of the returned array (#29670).- A new method
rand(::Tuple)
implements sampling from the values of a tuple (#25278). serialize
anddeserialize
now accept a filename argument, likewrite
andread
([#30151]).
sprandn
now supports specifying the output element type (#30083).
mean
andvar
now handles the empty case (#29033).
- 7zip (bundled with Julia on Windows) has been upgraded from version 16.04 to 18.05 (#30035).
- Busybox is no longer bundled with Julia on Windows (#30022).
- OpenBLAS has been upgraded from 0.3.2 to 0.3.3 (#29845).
- The source code for Pkg is no longer included in JuliaLang/julia. Pkg is instead downloaded during the build process (#29615).
- LLVM has been upgraded to 6.0.1 and support for LLVM < 6.0 has been dropped (#28745, #28696).
one(i::CartesianIndex)
should be replaced withoneunit(i::CartesianIndex)
(#29442).- The internal array
Base.Grisu.DIGITS
is deprecated; new code should useBase.Grisu.getbuf()
to get an appropriate task-local buffer and pass it togrisu()
instead (#29907). - The internal function
Base._default_type(T)
has been removed. Calls to it should be replaced with just the argumentT
(#29739). peakflops
has been scheduled to move fromInteractiveUtils
toLinearAlgebra
but is already now available asLinearAlgebra.peakflops
(#29978).