@@ -40,6 +40,9 @@ New language features
40
40
* Field access via dot-syntax can now be overloaded by adding methods to
41
41
` Base.getproperty ` and ` Base.setproperty! ` ([ #1974 ] ).
42
42
43
+ * Values for ` Enum ` s can now be specified inside of a ` begin ` block when using the
44
+ ` @enum ` macro ([ #25424 ] ).
45
+
43
46
Language changes
44
47
----------------
45
48
@@ -176,6 +179,8 @@ Language changes
176
179
* The syntax ` using A.B ` can now only be used when ` A.B ` is a module, and the syntax
177
180
` using A: B ` can only be used for adding single bindings ([ #8000 ] ).
178
181
182
+ * ` => ` now has its own precedence level, giving it strictly higher precedence than
183
+ ` = ` and ` , ` ([ #25391 ] ).
179
184
180
185
Breaking changes
181
186
----------------
@@ -359,9 +364,27 @@ This section lists changes that do not have deprecation warnings.
359
364
trait; see its documentation for details. Types which support subtraction (operator
360
365
` - ` ) must now implement ` widen ` for hashing to work inside heterogeneous arrays.
361
366
362
- * ` findn(x::AbstractVector) ` now return a 1-tuple with the vector of indices, to be
367
+ * ` findn(x::AbstractVector) ` now returns a 1-tuple with the vector of indices, to be
363
368
consistent with higher order arrays ([ #25365 ] ).
364
369
370
+ * ` find ` now returns the same type of indices as ` keys ` /` pairs ` for ` AbstractArray ` ,
371
+ ` AbstractDict ` , ` AbstractString ` , ` Tuple ` and ` NamedTuple ` objects ([ #24774 ] ).
372
+ In particular, this means that it returns ` CartesianIndex ` objects for matrices
373
+ and higher-dimensional arrays instead of linear indices as was previously the case.
374
+ Use ` LinearIndices(a)[find(f, a)] ` to compute linear indices.
375
+
376
+ * ` AbstractSet ` objects are now considered equal by ` == ` and ` isequal ` if all of their
377
+ elements are equal ([ #25368 ] ). This has required changing the hashing algorithm
378
+ for ` BitSet ` .
379
+
380
+ * the default behavior of ` titlecase ` is changed in two ways ([ #23393 ] ):
381
+ + characters not starting a word are converted to lowercase;
382
+ a new keyword argument ` strict ` is added which
383
+ allows to get the old behavior when it's ` false ` .
384
+ + any non-letter character is considered as a word separator;
385
+ to get the old behavior (only "space" characters are considered as
386
+ word separators), use the keyword ` wordsep=isspace ` .
387
+
365
388
Library improvements
366
389
--------------------
367
390
@@ -844,26 +867,25 @@ Deprecated or removed
844
867
* ` workspace ` is discontinued, check out [ Revise.jl] ( https://github.com/timholy/Revise.jl )
845
868
for an alternative workflow ([ #25046 ] ).
846
869
847
- * ` cumsum ` , ` cumprod ` , ` accumulate ` , and their mutating versions now require a ` dim `
848
- argument instead of defaulting to using the first dimension ([ #24684 ] ).
870
+ * ` cumsum ` , ` cumprod ` , ` accumulate ` , their mutating versions, and ` diff ` all now require a ` dim `
871
+ argument instead of defaulting to using the first dimension unless there is only
872
+ one dimension ([ #24684 ] , [ #25457 ] ).
849
873
850
874
* The ` sum_kbn ` and ` cumsum_kbn ` functions have been moved to the
851
875
[ KahanSummation] ( https://github.com/JuliaMath/KahanSummation.jl ) package ([ #24869 ] ).
852
876
853
- * Unicode-related string functions have been moved to the new ` Unicode ` standard
854
- library module ( [ # 25021 ] ). This applies to ` normalize_string ` , ` graphemes ` ,
855
- ` is_assigned_char ` , ` textwidth ` , ` islower ` , ` isupper ` , ` isalpha ` ,
856
- ` isdigit ` , ` isxdigit ` , ` isnumber ` , ` isalnum ` , ` iscntrl ` , ` ispunct ` , ` isspace ` ,
857
- ` isprint ` , ` isgraph ` , ` lowercase ` , ` uppercase ` , ` titlecase ` , ` lcfirst ` and ` ucfirst ` .
877
+ * ` isnumber ` has been renamed to ` isnumeric ` ( [ # 25021 ] ).
878
+
879
+ * ` is_assigned_char ` and ` normalize_string ` have been renamed to ` isassigned ` and
880
+ ` normalize ` , and moved to the new ` Unicode ` standard library module.
881
+ ` graphemes ` has also been moved to that module ( [ # 25021 ] ) .
858
882
859
883
* The functions ` eigs ` and ` svds ` have been moved to the ` IterativeEigensolvers ` standard
860
884
library module ([ #24714 ] ).
861
885
862
- * ` @printf ` and ` @sprintf ` have been moved to the ` Printf ` standard library ([ #23929 ] , [ # 25056 ] ).
886
+ * Sparse array functionality has moved to the ` SparseArrays ` standard library module ([ #25249 ] ).
863
887
864
- * ` isnumber ` has been deprecated in favor of ` isnumeric ` , ` is_assigned_char `
865
- in favor of ` isassigned ` and ` normalize_string ` in favor of ` normalize ` , all three
866
- in the new ` Unicode ` standard library module ([ #25021 ] ).
888
+ * ` @printf ` and ` @sprintf ` have been moved to the ` Printf ` standard library ([ #23929 ] ,[ #25056 ] ).
867
889
868
890
* The aliases ` Complex32 ` , ` Complex64 ` and ` Complex128 ` have been deprecated in favor of ` ComplexF16 ` ,
869
891
` ComplexF32 ` and ` ComplexF64 ` respectively ([ #24647 ] ).
@@ -918,6 +940,11 @@ Deprecated or removed
918
940
* ` rand(t::Tuple{Vararg{Int}}) ` is deprecated in favor of ` rand(Float64, t) ` or ` rand(t...) ` ;
919
941
` rand(::Tuple) ` will have another meaning in the future ([ #25429 ] , [ #25278 ] ).
920
942
943
+ * The generic implementations of ` strides(::AbstractArray) ` and ` stride(::AbstractArray, ::Int) `
944
+ have been deprecated. Subtypes of ` AbstractArray ` that implement the newly introduced strided
945
+ array interface should define their own ` strides ` method ([ #25321 ] ).
946
+
947
+
921
948
Command-line option changes
922
949
---------------------------
923
950
@@ -1140,6 +1167,7 @@ Command-line option changes
1140
1167
[ #24713 ] : https://github.com/JuliaLang/julia/issues/24713
1141
1168
[ #24714 ] : https://github.com/JuliaLang/julia/issues/24714
1142
1169
[ #24715 ] : https://github.com/JuliaLang/julia/issues/24715
1170
+ [ #24774 ] : https://github.com/JuliaLang/julia/issues/24774
1143
1171
[ #24781 ] : https://github.com/JuliaLang/julia/issues/24781
1144
1172
[ #24785 ] : https://github.com/JuliaLang/julia/issues/24785
1145
1173
[ #24786 ] : https://github.com/JuliaLang/julia/issues/24786
@@ -1165,3 +1193,4 @@ Command-line option changes
1165
1193
[ #25184 ] : https://github.com/JuliaLang/julia/issues/25184
1166
1194
[ #25231 ] : https://github.com/JuliaLang/julia/issues/25231
1167
1195
[ #25365 ] : https://github.com/JuliaLang/julia/issues/25365
1196
+ [ #25424 ] : https://github.com/JuliaLang/julia/issues/25424
0 commit comments