|
| 1 | +Julia v1.10 Release Notes |
| 2 | +========================= |
| 3 | +New language features |
| 4 | +--------------------- |
| 5 | + |
| 6 | +* JuliaSyntax.jl is now used as the default parser, providing better diagnostics and faster |
| 7 | + parsing. Set environment variable `JULIA_USE_NEW_PARSER` to `0` to switch back to the old |
| 8 | + parser if necessary (and if you find this necessary, please file an issue) ([#46372]). |
| 9 | +* `⥺` (U+297A, `\leftarrowsubset`) and `⥷` (U+2977, `\leftarrowless`) |
| 10 | + may now be used as binary operators with arrow precedence. ([#45962]) |
| 11 | + |
| 12 | +Language changes |
| 13 | +---------------- |
| 14 | + |
| 15 | +* When a task forks a child, the parent task's task-local RNG (random number generator) is no longer affected. The seeding of child based on the parent task also takes a more disciplined approach to collision resistance, using a design based on the SplitMix and DotMix splittable RNG schemes ([#49110]). |
| 16 | +* A new more-specific rule for methods resolves ambiguities containing Union{} in favor of |
| 17 | + the method defined explicitly to handle the Union{} argument. This makes it possible to |
| 18 | + define methods to explicitly handle Union{} without the ambiguities that commonly would |
| 19 | + result previously. This also lets the runtime optimize certain method lookups in a way |
| 20 | + that significantly improves load and inference times for heavily overloaded methods that |
| 21 | + dispatch on Types (such as traits and constructors). |
| 22 | +* The "h bar" `ℏ` (`\hslash` U+210F) character is now treated as equivalent to `ħ` (`\hbar` U+0127). |
| 23 | +* The `@simd` macro now has a more limited and clearer semantics, it only enables reordering and contraction |
| 24 | + of floating-point operations, instead of turning on all "fastmath" optimizations. |
| 25 | + If you observe performance regressions due to this change, you can recover previous behavior with `@fastmath @simd`, |
| 26 | + if you are OK with all the optimizations enabled by the `@fastmath` macro. ([#49405]) |
| 27 | +* When a method with keyword arguments is displayed in the stack trace view, the textual |
| 28 | + representation of the keyword arguments' types is simplified using the new |
| 29 | + `@Kwargs{key1::Type1, ...}` macro syntax ([#49959]). |
| 30 | + |
| 31 | +Compiler/Runtime improvements |
| 32 | +----------------------------- |
| 33 | + |
| 34 | +* The `@pure` macro is now deprecated. Use `Base.@assume_effects :foldable` instead ([#48682]). |
| 35 | +* The mark phase of the Garbage Collector is now multi-threaded ([#48600]). |
| 36 | +* [JITLink](https://llvm.org/docs/JITLink.html) is enabled by default on Linux aarch64 when Julia is linked to LLVM 15 or later versions ([#49745]). |
| 37 | + This should resolve many segmentation faults previously observed on this platform. |
| 38 | + |
| 39 | +Command-line option changes |
| 40 | +--------------------------- |
| 41 | + |
| 42 | +* New option `--gcthreads` to set how many threads will be used by the Garbage Collector ([#48600]). |
| 43 | + The default is set to `N/2` where `N` is the amount of worker threads (`--threads`) used by Julia. |
| 44 | + |
| 45 | +New library functions |
| 46 | +--------------------- |
| 47 | +* `tanpi` is now defined. It computes tan(πx) more accurately than `tan(pi*x)` ([#48575]). |
| 48 | +* `fourthroot(x)` is now defined in `Base.Math` and can be used to compute the fourth root of `x`. |
| 49 | + It can also be accessed using the unicode character `∜`, which can be typed by `\fourthroot<tab>` ([#48899]). |
| 50 | +* `Libc.memmove`, `Libc.memset`, and `Libc.memcpy` are now defined, whose functionality matches that of their respective C calls. |
| 51 | +* `Base.isprecompiled(pkg::PkgId)` to identify whether a package has already been precompiled ([#50218]). |
| 52 | + |
| 53 | +New library features |
| 54 | +-------------------- |
| 55 | +* The `initialized=true` keyword assignment for `sortperm!` and `partialsortperm!` |
| 56 | + is now a no-op ([#47979]). It previously exposed unsafe behavior ([#47977]). |
| 57 | +* `binomial(x, k)` now supports non-integer `x` ([#48124]). |
| 58 | +* A `CartesianIndex` is now treated as a "scalar" for broadcasting ([#47044]). |
| 59 | +* `printstyled` now supports italic output ([#45164]). |
| 60 | +* `parent` and `parentindices` support `SubString`s |
| 61 | + |
| 62 | +Standard library changes |
| 63 | +------------------------ |
| 64 | + |
| 65 | +* `startswith` now supports seekable `IO` streams ([#43055]) |
| 66 | +* printing integral `Rational`s will skip the denominator in `Rational`-typed IO context (e.g. in `Arrays`) ([#45396]) |
| 67 | + |
| 68 | +#### Package Manager |
| 69 | + |
| 70 | +* `Pkg.precompile` now accepts `timing` as a keyword argument which displays per package timing information for precompilation (e.g. `Pkg.precompile(timing=true)`) |
| 71 | + |
| 72 | +#### LinearAlgebra |
| 73 | + |
| 74 | +* `AbstractQ` no longer subtypes to `AbstractMatrix`. Moreover, `adjoint(Q::AbstractQ)` |
| 75 | + no longer wraps `Q` in an `Adjoint` type, but instead in an `AdjointQ`, that itself |
| 76 | + subtypes `AbstractQ`. This change accounts for the fact that typically `AbstractQ` |
| 77 | + instances behave like function-based, matrix-backed linear operators, and hence don't |
| 78 | + allow for efficient indexing. Also, many `AbstractQ` types can act on vectors/matrices |
| 79 | + of different size, acting like a matrix with context-dependent size. With this change, |
| 80 | + `AbstractQ` has a well-defined API that is described in detail in the |
| 81 | + [Julia documentation](https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#man-linalg-abstractq) |
| 82 | + ([#46196]). |
| 83 | +* Adjoints and transposes of `Factorization` objects are no longer wrapped in `Adjoint` |
| 84 | + and `Transpose` wrappers, respectively. Instead, they are wrapped in |
| 85 | + `AdjointFactorization` and `TranposeFactorization` types, which themselves subtype |
| 86 | + `Factorization` ([#46874]). |
| 87 | +* New functions `hermitianpart` and `hermitianpart!` for extracting the Hermitian |
| 88 | + (real symmetric) part of a matrix ([#31836]). |
| 89 | +* The `norm` of the adjoint or transpose of an `AbstractMatrix` now returns the norm of the |
| 90 | + parent matrix by default, matching the current behaviour for `AbstractVector`s ([#49020]). |
| 91 | +* `eigen(A, B)` and `eigvals(A, B)`, where one of `A` or `B` is symmetric or Hermitian, |
| 92 | + are now fully supported ([#49533]) |
| 93 | +* `eigvals/eigen(A, cholesky(B))` now computes the generalized eigenvalues (`eigen`: and eigenvectors) |
| 94 | + of `A` and `B` via Cholesky decomposition for positive definite `B`. Note: The second argument is |
| 95 | + the output of `cholesky`. |
| 96 | + |
| 97 | +#### Printf |
| 98 | +* Format specifiers now support dynamic width and precision, e.g. `%*s` and `%*.*g` ([#40105]). |
| 99 | + |
| 100 | +#### REPL |
| 101 | + |
| 102 | +* When stack traces are printed, the printed depth of types in function signatures will be limited |
| 103 | + to avoid overly verbose output ([#49795]). |
| 104 | + |
| 105 | +#### Test |
| 106 | + |
| 107 | +* The `@test_broken` macro (or `@test` with `broken=true`) now complains if the test expression returns a |
| 108 | + non-boolean value in the same way as a non-broken test. ([#47804]) |
| 109 | +* When a call to `@test` fails or errors inside a function, a larger stacktrace is now printed such that the location of the test within a `@testset` can be retrieved ([#49451]) |
| 110 | + |
| 111 | +#### InteractiveUtils |
| 112 | + |
| 113 | + * `code_native` and `@code_native` now default to intel syntax instead of AT&T. |
| 114 | + * `@time_imports` now shows the timing of any module `__init__()`s that are run ([#49529]) |
| 115 | + |
1 | 116 | Julia v1.9 Release Notes
|
2 | 117 | ========================
|
3 | 118 |
|
|
0 commit comments