-
Generator expressions, e.g.
f(i) for i in 1:n
(#4470). This returns an iterator that computes the specified values on demand. -
Macro expander functions are now generic, so macros can have multiple definitions (e.g. for different numbers of arguments, or optional arguments) (#8846, #9627). However note that the argument types refer to the syntax tree representation, and not to the types of run time values.
-
x ∈ X
is now a synonym forx in X
infor
loops and comprehensions, as it already was in comparisons (#13824).
-
Each function and closure now has its own type. The captured variables of a closure are fields of its type.
Function
is now an abstract type, and is the default supertype of functions and closures. All functions, including anonymous functions, are generic and support all features (e.g. keyword arguments). Instead of adding methods tocall
, methods are added by type using the syntax(::ftype)(...) = ...
.call
is deprecated (#13412). -
using
andimport
are now case-sensitive even on case-insensitive filesystems (common on Mac and Windows) (#13542). -
Relational symbols are now allowed as infix operators (#8036).
-
A warning is always given when a method is overwritten (previously, this was done only when the new and old definitions were in separate modules) (#14759).
-
A <: B
is parsed asExpr(:(<:), :A, :B)
in all cases (#9503). This also applies to the>:
operator. -
Simple 2-argument comparisons like
A < B
are parsed as calls intead of using the:comparison
expression type.
-
Local variables and arguments are represented in lowered code as numbered
Slot
objects instead of as symbols (#15609). -
The information that used to be in the
ast
field of theLambdaStaticData
type is now divided among the fieldscode
,slotnames
,slottypes
,slotflags
,gensymtypes
,rettype
,nargs
, andisva
in theLambdaInfo
type (#15609).
-
Most of the combinatorics functions have been moved from
Base
to the Combinatorics.jl package (#13897). -
Packages:
-
The
Base.Test
module now has a@testset
feature to bundle tests together and delay throwing an error until the end (#13062).-
The new features are mirrored in the BaseTestNext package for users who would like to use the new functionality on Julia v0.4.
-
The BaseTestDeprecated package provides the old-style
handler
functionality, for compatibility with code that needs to support both Julia v0.4 and v0.5.
-
-
The functions
remotecall
,remotecall_fetch
, andremotecall_wait
now have the function argument as the first argument to allow for do-block syntax (#13338). -
cov
andcor
don't use keyword arguments anymore and are therefore now type stable (#13465). -
Linear algebra:
-
All dimensions indexed by scalars are now dropped, whereas previously only trailing scalar dimensions would be omitted from the result.
-
New
normalize
andnormalize!
convenience functions for normalizing vectors (#13681). -
QR
-
A new
SparseVector
type allows for one-dimensional sparse arrays. Slicing and reshaping sparse matrices now return vectors when appropriate. Thesparsevec
function returns a one-dimensional sparse vector instead of a one-column sparse matrix. (#13440) -
Rank one update and downdate functions,
lowrankupdate
,lowrankupdate!
,lowrankdowndate
, andlowrankdowndate!
, for dense Cholesky factorizations (#14243,#14424) -
All
sparse
methods now retain provided numerical zeros as structural nonzeros; to drop numerical zeros, usedropzeros!
(#14798,#15242).
-
-
New
foreach
function for calling a function on every element of a collection when the results are not needed. -
Cmd(cmd; ...)
now accepts new Windows-specific optionswindows_verbatim
(to alter Windows command-line generation) andwindows_hide
(to suppress creation of new console windows) (#13780). -
Statistics:
-
The new
Base.StackTraces
module makes stack traces easier to use programmatically. (#14469)
-
The following function names have been simplified and unified (#13232):
-
get_bigfloat_precision
->precision(BigFloat)
-
set_bigfloat_precision
->setprecision
-
with_bigfloat_precision
->setprecision
-
get_rounding
->rounding
-
set_rounding
->setrounding
-
with_rounding
->setrounding
-
-
The method
A_ldiv_B!(SparseMatrixCSC, StrideVecOrMat)
has been deprecated in favor of versions that require the matrix to be in factored form (#13496). -
Deprecate
chol(A,Val{:U/:L})
in favor ofchol(A)
(#13680). -
issym
is deprecated in favor ofissymmetric
to match similar functions (ishermitian
, ...) (#15192) -
scale
is deprecated in favor of eitherα*A
,Diagonal(x)*A
, orA*Diagonal(x)
. (#15258)