Skip to content

Commit b472f88

Browse files
authored
NEWS edits for 1.5 (#35754)
1 parent 34d95d0 commit b472f88

File tree

1 file changed

+95
-49
lines changed

1 file changed

+95
-49
lines changed

NEWS.md

Lines changed: 95 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,18 @@ Julia v1.5 Release Notes
33

44
New language features
55
---------------------
6+
67
* Macro calls `@foo {...}` can now also be written `@foo{...}` (without the space) ([#34498]).
78
* `` is now parsed as a binary operator with times precedence. It can be entered in the REPL
89
with `\bbsemi` followed by <kbd>TAB</kbd> ([#34722]).
9-
1010
* `±` and `` are now unary operators as well, like `+` or `-`. Attention has to be paid in
1111
macros and matrix constructors, which are whitespace sensitive, because expressions like
12-
`[a ±b]` now get parsed as `[a ±(b)]` instead of `[±(a, b)]`. ([#34200])
13-
12+
`[a ±b]` now get parsed as `[a ±(b)]` instead of `[±(a, b)]` ([#34200]).
1413
* Passing an identifier `x` by itself as a keyword argument or named tuple element
1514
is equivalent to `x=x`, implicitly using the name of the variable as the keyword
1615
or named tuple field name.
1716
Similarly, passing an `a.b` expression uses `b` as the keyword or field name ([#29333]).
18-
19-
* Packages can now provide custom hints to help users resolve errors by using the
20-
experimental `Base.Experimental.register_error_hint` function.
21-
Packages that define custom exception types can support hints by
22-
calling the `Base.Experimental.show_error_hints` from their
23-
`showerror` method. ([#35094])
24-
2517
* Support for Unicode 13.0.0 (via utf8proc 2.5) ([#35282]).
26-
2718
* The compiler optimization level can now be set per-module using the experimental macro
2819
`Base.Experimental.@optlevel n`. For code that is not performance-critical, setting
2920
this to 0 or 1 can provide significant latency improvements ([#34896]).
@@ -37,28 +28,16 @@ Language changes
3728
[IJulia](https://github.com/JuliaLang/IJulia.jl).
3829
Note that this only affects expressions interactively typed or pasted directly into the
3930
default REPL ([#28789], [#33864]).
40-
4131
* Outside of the REPL (e.g. in a file), assigning to a variable within a top-level scope
4232
block is considered ambiguous if a global variable with the same name exists.
4333
A warning is given if that happens, to alert you that the code will work differently
4434
than in the REPL.
4535
A new command line option `--warn-scope` controls this warning ([#33864]).
46-
4736
* Converting arbitrary tuples to `NTuple`, e.g. `convert(NTuple, (1, ""))` now gives an error,
4837
where it used to be incorrectly allowed. This is because `NTuple` refers only to homogeneous
4938
tuples (this meaning has not changed) ([#34272]).
50-
51-
* In docstrings, a level-1 markdown header "Extended help" is now
52-
interpreted as a marker dividing "brief help" from "extended help."
53-
The REPL help mode only shows the brief help (the content before the
54-
"Extended help" header) by default; prepend the expression with '?'
55-
(in addition to the one that enters the help mode) to see the full
56-
docstring. ([#25930])
57-
5839
* The syntax `(;)` (which was deprecated in v1.4) now creates an empty named tuple ([#30115]).
59-
6040
* `@inline` macro can now be applied to short-form anonymous functions ([#34953]).
61-
6241
* In triple-quoted string literals, whitespace stripping is now done before processing
6342
escape sequences instead of after. For example, the syntax
6443
```
@@ -68,14 +47,12 @@ Language changes
6847
used to yield the string " a\nb", since the single space before `b` set the indent level.
6948
Now the result is "a\n b", since the space before `b` is no longer considered to occur
7049
at the start of a line. The old behavior is considered a bug ([#35001]).
71-
7250
* The line number of function definitions is now added by the parser as an
7351
additional `LineNumberNode` at the start of each function body ([#35138]).
74-
7552
* Statements of the form `a'` now get lowered to `var"'"(a)` instead of `Base.adjoint(a)`. This
7653
allows for shadowing this function in local scopes, although this is generally discouraged.
7754
By default, Base exports `var"'"` as an alias of `Base.adjoint`, so custom types should still
78-
extend `Base.adjoint`. ([#34634])
55+
extend `Base.adjoint` ([#34634]).
7956

8057
Compiler/Runtime improvements
8158
-----------------------------
@@ -92,15 +69,13 @@ Command-line option changes
9269

9370
* Deprecation warnings are no longer shown by default. i.e. if the `--depwarn=...` flag is
9471
not passed it defaults to `--depwarn=no`. The warnings are printed from tests run by
95-
`Pkg.test()`. ([#35362]).
96-
97-
* Color now defaults to on when stdout and stderr are TTYs ([#34347])
98-
72+
`Pkg.test()` ([#35362]).
73+
* Color now defaults to on when stdout and stderr are TTYs ([#34347]).
9974
* `-t N`, `--threads N` starts Julia with `N` threads. This option takes precedence over
10075
`JULIA_NUM_THREADS`. The specified number of threads also propagates to worker
10176
processes spawned using the `-p`/`--procs` or `--machine-file` command line arguments.
10277
In order to set number of threads for worker processes spawned with `addprocs` use the
103-
`exeflags` keyword argument, e.g. `` addprocs(...; exeflags=`--threads 4`) `` ([#35108]).
78+
`exeflags` keyword argument, e.g. ```addprocs(...; exeflags=`--threads 4`)``` ([#35108]).
10479

10580
Multi-threading changes
10681
-----------------------
@@ -114,35 +89,40 @@ Multi-threading changes
11489

11590
Build system changes
11691
--------------------
117-
* The build system now contains a pure-make caching system for expanding expensive operations at the latest
118-
possible moment, while still expanding it only once. ([#35626])
11992

93+
* The build system now contains a pure-make caching system for expanding expensive operations at the latest
94+
possible moment, while still expanding it only once ([#35626]).
12095

12196
New library functions
12297
---------------------
123-
* The `@ccall` macro has been added to Base. It is a near drop-in replacement for `ccall` with more Julia-like syntax. It also wraps the new `foreigncall` API for varargs of different types, though it lacks the capability to specify an LLVM calling convention. ([#32748])
98+
99+
* Packages can now provide custom hints to help users resolve errors by using the
100+
experimental `Base.Experimental.register_error_hint` function.
101+
Packages that define custom exception types can support hints by calling the
102+
`Base.Experimental.show_error_hints` from their `showerror` method ([#35094]).
103+
* The `@ccall` macro has been added to Base. It is a near drop-in replacement for `ccall` with more Julia-like syntax. It also wraps the new `foreigncall` API for varargs of different types, though it lacks the capability to specify an LLVM calling convention ([#32748]).
124104
* New functions `mergewith` and `mergewith!` supersede `merge` and `merge!` with `combine`
125105
argument. They don't have the restriction for `combine` to be a `Function` and also
126106
provide one-argument method that returns a closure. The old methods of `merge` and
127107
`merge!` are still available for backward compatibility ([#34296]).
128108
* The new `isdisjoint` function indicates whether two collections are disjoint ([#34427]).
129-
* Add function `ismutable` and deprecate `isimmutable` to check whether something is mutable.([#34652])
109+
* Add function `ismutable` and deprecate `isimmutable` to check whether something is mutable ([#34652]).
130110
* `include` now accepts an optional `mapexpr` first argument to transform the parsed
131111
expressions before they are evaluated ([#34595]).
132112
* New function `bitreverse` for reversing the order of bits in a fixed-width integer ([#34791]).
133113
* New function `bitrotate(x, k)` for rotating the bits in a fixed-width integer ([#33937]).
134-
* One argument methods `startswith(x)` and `endswith(x)` have been added, returning partially-applied versions of the functions, similar to existing methods like `isequal(x)` ([#33193]).
135-
* New function `contains(haystack, needle)` and its one argument partially applied form have been added, it acts like `occursin(needle, haystack)`([#35132]).
114+
* New function `contains(haystack, needle)` and its one argument partially applied form have been added, it acts like `occursin(needle, haystack)` ([#35132]).
136115
* New function `Base.exit_on_sigint` is added to control if `InterruptException` is
137116
thrown by Ctrl-C ([#29411]).
138117

139118
New library features
140119
--------------------
141-
* Function composition now works also on one argument `∘(f) = f` (#34251)
142-
* `@NamedTuple{key1::Type1, ...}` macro for convenient `NamedTuple` declarations ([#34548]).
143120

121+
* Function composition now works also on one argument `∘(f) = f` (#34251).
122+
* One argument methods `startswith(x)` and `endswith(x)` have been added, returning partially-applied versions of the functions, similar to existing methods like `isequal(x)` ([#33193]).
144123
* `isapprox` (or ``) now has a one-argument "curried" method `isapprox(x)` which returns a function, like `isequal` (or `==`) ([#32305]).
145-
* `Ref{NTuple{N,T}}` can be passed to `Ptr{T}`/`Ref{T}` `ccall` signatures ([#34199])
124+
* `@NamedTuple{key1::Type1, ...}` macro for convenient `NamedTuple` declarations ([#34548]).
125+
* `Ref{NTuple{N,T}}` can be passed to `Ptr{T}`/`Ref{T}` `ccall` signatures ([#34199]).
146126
* `x::Signed % Unsigned` and `x::Unsigned % Signed` are supported for integer bitstypes.
147127
* `signed(unsigned_type)` is supported for integer bitstypes, `unsigned(signed_type)` has been supported.
148128
* `accumulate`, `cumsum`, and `cumprod` now support `Tuple` ([#34654]) and arbitrary iterators ([#34656]).
@@ -152,16 +132,17 @@ New library features
152132
* The `@view` and `@views` macros now support the `a[begin]` syntax that was introduced in Julia 1.4 ([#35289]).
153133
* `open` for files now accepts a keyword argument `lock` controlling whether file operations
154134
will acquire locks for safe multi-threaded access. Setting it to `false` provides better
155-
performance when only one thread will access the file.
135+
performance when only one thread will access the file ([#35426]).
156136
* The introspection macros (`@which`, `@code_typed`, etc.) now work with `do`-block syntax ([#35283]) and with dot syntax ([#35522]).
157137
* `count` now accepts the `dims` keyword.
158138
* new in-place `count!` function similar to `sum!`.
159139

160140
Standard library changes
161141
------------------------
142+
162143
* Empty ranges now compare equal, regardless of their startpoint and step ([#32348]).
163144
* A 1-d `Zip` iterator (where `Base.IteratorSize` is `Base.HasShape{1}()`) with defined length of `n` has now also size of `(n,)` (instead of throwing an error with truncated iterators) ([#29927]).
164-
* The `@timed` macro now returns a `NamedTuple` ([#34149])
145+
* The `@timed` macro now returns a `NamedTuple` ([#34149]).
165146
* New `supertypes(T)` function returns a tuple of all supertypes of `T` ([#34419]).
166147
* Views of builtin ranges are now recomputed ranges (like indexing returns) instead of
167148
`SubArray`s ([#26872]).
@@ -176,55 +157,60 @@ Standard library changes
176157
contents ([#31149]).
177158

178159
#### LinearAlgebra
160+
179161
* The BLAS submodule now supports the level-2 BLAS subroutine `hpmv!` ([#34211]).
180-
* `normalize` now supports multidimensional arrays ([#34239])
162+
* `normalize` now supports multidimensional arrays ([#34239]).
181163
* `lq` factorizations can now be used to compute the minimum-norm solution to under-determined systems ([#34350]).
182164
* The BLAS submodule now supports the level-2 BLAS subroutine `spmv!` ([#34320]).
183165
* The BLAS submodule now supports the level-1 BLAS subroutine `rot!` ([#35124]).
184166
* New generic `rotate!(x, y, c, s)` and `reflect!(x, y, c, s)` functions ([#35124]).
185167

186168
#### Markdown
187169

170+
* In docstrings, a level-1 markdown header "Extended help" is now interpreted as a marker
171+
dividing "brief help" from "extended help". The REPL help mode only shows the brief help
172+
(the content before the "Extended help" header) by default; prepend the expression with '?'
173+
(in addition to the one that enters the help mode) to see the full docstring ([#25930]).
188174

189175
#### Random
190176

191177
* `randn!(::MersenneTwister, ::Array{Float64})` is faster, and as a result, for a given state of the RNG,
192178
the corresponding generated numbers have changed ([#35078]).
193-
194179
* `rand!(::MersenneTwister, ::Array{Bool})` is faster, and as a result, for a given state of the RNG,
195180
the corresponding generated numbers have changed ([#33721]).
196-
197181
* A new faster algorithm ("nearly division less") is used for generating random numbers
198182
within a range ([#29240]). As a result, the streams of generated numbers are changed
199183
(for ranges, like in `rand(1:9)`, and for collections in general, like in `rand([1, 2, 3])`).
200184
Also, for performance, the undocumented property that, given a seed and `a, b` of type `Int`,
201185
`rand(a:b)` produces the same stream on 32 and 64 bits architectures, is dropped.
202186

203-
204187
#### REPL
205188

206189

207190
#### SparseArrays
191+
208192
* `lu!` accepts `UmfpackLU` as an argument to make use of its symbolic factorization.
209193
* The `trim` keyword argument for the functions `fkeep!`, `tril!`, `triu!`,
210194
`droptol!`,`dropzeros!` and `dropzeros` has been removed in favour of always
211195
trimming. Calling these with `trim=false` could result in invalid sparse
212196
arrays.
213197

214198
#### Dates
199+
215200
* The `eps` function now accepts `TimeType` types ([#31487]).
216201
* The `zero` function now accepts `TimeType` types ([#35554]).
217202

218-
219203
#### Statistics
220204

221205

222206
#### Sockets
207+
223208
* Joining and leaving UDP multicast groups on a `UDPSocket` is now supported
224209
through `join_multicast_group()` and `leave_multicast_group()` ([#35521]).
225210

226211
#### Distributed
227-
* `launch_on_machine` now supports and parses ipv6 square-bracket notation ([#34430])
212+
213+
* `launch_on_machine` now supports and parses ipv6 square-bracket notation ([#34430]).
228214

229215
Deprecated or removed
230216
---------------------
@@ -236,5 +222,65 @@ Tooling Improvements
236222
---------------------
237223

238224

239-
240225
<!--- generated by NEWS-update.jl: -->
226+
[#25930]: https://github.com/JuliaLang/julia/issues/25930
227+
[#26872]: https://github.com/JuliaLang/julia/issues/26872
228+
[#28789]: https://github.com/JuliaLang/julia/issues/28789
229+
[#29240]: https://github.com/JuliaLang/julia/issues/29240
230+
[#29333]: https://github.com/JuliaLang/julia/issues/29333
231+
[#29411]: https://github.com/JuliaLang/julia/issues/29411
232+
[#29927]: https://github.com/JuliaLang/julia/issues/29927
233+
[#30115]: https://github.com/JuliaLang/julia/issues/30115
234+
[#31149]: https://github.com/JuliaLang/julia/issues/31149
235+
[#31487]: https://github.com/JuliaLang/julia/issues/31487
236+
[#32305]: https://github.com/JuliaLang/julia/issues/32305
237+
[#32348]: https://github.com/JuliaLang/julia/issues/32348
238+
[#32748]: https://github.com/JuliaLang/julia/issues/32748
239+
[#33193]: https://github.com/JuliaLang/julia/issues/33193
240+
[#33721]: https://github.com/JuliaLang/julia/issues/33721
241+
[#33864]: https://github.com/JuliaLang/julia/issues/33864
242+
[#33886]: https://github.com/JuliaLang/julia/issues/33886
243+
[#33937]: https://github.com/JuliaLang/julia/issues/33937
244+
[#34149]: https://github.com/JuliaLang/julia/issues/34149
245+
[#34199]: https://github.com/JuliaLang/julia/issues/34199
246+
[#34200]: https://github.com/JuliaLang/julia/issues/34200
247+
[#34211]: https://github.com/JuliaLang/julia/issues/34211
248+
[#34239]: https://github.com/JuliaLang/julia/issues/34239
249+
[#34272]: https://github.com/JuliaLang/julia/issues/34272
250+
[#34296]: https://github.com/JuliaLang/julia/issues/34296
251+
[#34320]: https://github.com/JuliaLang/julia/issues/34320
252+
[#34347]: https://github.com/JuliaLang/julia/issues/34347
253+
[#34350]: https://github.com/JuliaLang/julia/issues/34350
254+
[#34419]: https://github.com/JuliaLang/julia/issues/34419
255+
[#34427]: https://github.com/JuliaLang/julia/issues/34427
256+
[#34430]: https://github.com/JuliaLang/julia/issues/34430
257+
[#34498]: https://github.com/JuliaLang/julia/issues/34498
258+
[#34524]: https://github.com/JuliaLang/julia/issues/34524
259+
[#34548]: https://github.com/JuliaLang/julia/issues/34548
260+
[#34595]: https://github.com/JuliaLang/julia/issues/34595
261+
[#34634]: https://github.com/JuliaLang/julia/issues/34634
262+
[#34652]: https://github.com/JuliaLang/julia/issues/34652
263+
[#34654]: https://github.com/JuliaLang/julia/issues/34654
264+
[#34656]: https://github.com/JuliaLang/julia/issues/34656
265+
[#34722]: https://github.com/JuliaLang/julia/issues/34722
266+
[#34791]: https://github.com/JuliaLang/julia/issues/34791
267+
[#34896]: https://github.com/JuliaLang/julia/issues/34896
268+
[#34953]: https://github.com/JuliaLang/julia/issues/34953
269+
[#35001]: https://github.com/JuliaLang/julia/issues/35001
270+
[#35078]: https://github.com/JuliaLang/julia/issues/35078
271+
[#35094]: https://github.com/JuliaLang/julia/issues/35094
272+
[#35108]: https://github.com/JuliaLang/julia/issues/35108
273+
[#35124]: https://github.com/JuliaLang/julia/issues/35124
274+
[#35132]: https://github.com/JuliaLang/julia/issues/35132
275+
[#35138]: https://github.com/JuliaLang/julia/issues/35138
276+
[#35282]: https://github.com/JuliaLang/julia/issues/35282
277+
[#35283]: https://github.com/JuliaLang/julia/issues/35283
278+
[#35289]: https://github.com/JuliaLang/julia/issues/35289
279+
[#35303]: https://github.com/JuliaLang/julia/issues/35303
280+
[#35362]: https://github.com/JuliaLang/julia/issues/35362
281+
[#35426]: https://github.com/JuliaLang/julia/issues/35426
282+
[#35513]: https://github.com/JuliaLang/julia/issues/35513
283+
[#35521]: https://github.com/JuliaLang/julia/issues/35521
284+
[#35522]: https://github.com/JuliaLang/julia/issues/35522
285+
[#35554]: https://github.com/JuliaLang/julia/issues/35554
286+
[#35626]: https://github.com/JuliaLang/julia/issues/35626

0 commit comments

Comments
 (0)