Julia 1.12 Highlights

https://news.ycombinator.com/rss Hits: 6
Summary

Julia version 1.12 has finally been released. We want to thank all the contributors to this release and all the testers who helped find regressions and issues in the pre-releases. Without you, this release would not have been possible. The full list of changes can be found in the NEWS file, but here we'll give a more in-depth overview of some of the release highlights. Jeff Bezanson, Cody Tapscott, Gabriel Baraldi julia now has a new experimental--trim feature, when compiling a system image with this mode julia will trim statically unreachable code leading to significantly better compile times and binary sizes. To use it you also need to pass the --experimental flag when building the system image. In order to use it, any code that is reachable from the entrypoints must not have any dynamic dispatches otherwise the trimming will be unsafe and it will error during compilation. The expected way of using it is via the JuliaC.jl package, which provides a CLI and a programmatic API. For example a simple package with an @main function: module AppProject function @main(ARGS) println(Core.stdout, "Hello World!") return 0 end end juliac --output-exe app_test_exe --bundle build --trim=safe --experimental ./AppProject ./build/bin/app_test_exe Hello World! ls -lh build/bin/app_test_exe -rwxr-xr-x@ 1 gabrielbaraldi staff 1.1M Oct 6 17:22 ./build/bin/app_test_exe* Keno Fischer, Tim Holy Bindings now participate in the "world age" mechanism previously used for methods. This has the effect that constants and structs can be properly redefined. As an example: julia> struct Foo a::Int end julia> g(f::Foo) = f.a^2 g (generic function with 1 method) julia> g(Foo(2)) 4 julia> struct Foo a::Int b::Int end julia> g(Foo(1,2)) ERROR: MethodError: no method matching g(::Foo) The function `g` exists, but no method is defined for this combination of argument types. Closest candidates are: g(::@world(Foo, 39296:39300)) @ Main REPL[2]:1 julia> g(f::Foo) = f.a^2 + f.b^2 g (generic function with 2 m...

First seen: 2025-10-08 19:15

Last seen: 2025-10-09 00:16