Home InternationalClojure 1.11.4...
International⭐ Featured

Clojure 1.11.4

Clojure 1.11.4 is now available with the following fixes: CLJ-2145 Fix clearing of closed overs in ^:once fns In some cases (see the ticket for details), functions that closed-over bindings in the outer scope were not clearing the use of those bindings in the inner function scope, which could potentially cause head-holding. These closed-overs are now clearable for garbage collection. CLJ-2317 recur to head of :once fn cancels once The :once function metadata is a hint to the compiler that a function will only be run once, and thus closed-over fields may be cleared. It is nonsensical to recur to the head of a :once fn (as that implies running it more than once), but this situation can arise through the use of macros that apply wrap arbitrary bodies in :once fns. In this case closed-over fields would sometimes be cleared prior to the recur. Now, use of recur to the head of a :once fn will ignore the :once flag and closed-over fields will not be cleared in the fn. Clearing of other local fields (not closed-over) is unchanged.

6 April 2026 at 07:41 pm
1 views
Clojure 1.11.4

Clojure 1.11.4 has been released, bringing two significant fixes that address issues related to garbage collection and function behavior in the Clojure programming language. These updates are crucial for developers who rely on Clojure's unique features, such as the `:once` function metadata and `^:once` special forms, which help optimize performance by allowing the compiler to clear closed-over fields.

The first fix, CLJ-2145, resolves a problem with clearing closed-over bindings in `^:once` functions. In certain scenarios, functions that closed-over bindings in the outer scope were not properly clearing the use of those bindings in the inner function scope. This could lead to head-holding, a situation where memory cannot be garbage collected because the inner function still holds a reference to the outer scope. By addressing this issue, Clojure 1.11.4 ensures that these closed-overs are now clearable for garbage collection, preventing such memory leaks and improving overall performance.

The second fix, CLJ-2317, tackles a situation where using `recur` to jump to the head of a `:once` function would inadvertently clear closed-over fields. The `:once` metadata is a hint to the compiler that a function will only be run once, allowing it to clear closed-over fields. However, it is nonsensical to `recur` to the head of a `:once` function, as this implies running it more than once. This scenario can arise through the use of macros that wrap arbitrary bodies in `:once` functions. In previous versions, using `recur` in such cases would sometimes clear closed-over fields before the `recur`, causing unintended behavior.

In Clojure 1.11.4, using `recur` to the head of a `:once` function now ignores the `:once` flag, ensuring that closed-over fields are not cleared in the function. This change preserves the intended behavior of `:once` functions while avoiding unintended side effects. The clearing of other local fields, which are not closed-over, remains unchanged.

These updates not only fix critical issues but also enhance the reliability and performance of Clojure applications. Developers who have encountered the problems addressed by CLJ-2145 and CLJ-2317 will benefit from the improved garbage collection and function behavior. Additionally, Clojure 1.11.4 provides a more stable environment for those leveraging Clojure's unique features, allowing them to write efficient and maintainable code.

For those unfamiliar with Clojure's `:once` and `^:once` features, it's worth noting that they are designed to optimize performance by allowing the compiler to clear closed-over fields once a function has been executed. This can be particularly useful in scenarios where a function is intended to be run only once, such as during initialization or setup. By ensuring that these features work as expected, Clojure 1.11.4 further solidifies its reputation as a powerful and efficient language for building scalable and robust applications.

In conclusion, the release of Clojure 1.11.4 is a welcome update for developers who rely on the language's unique features. The fixes for CLJ-2145 and CLJ-2317 address critical issues related to garbage collection and function behavior, leading to improved performance and stability. As Clojure continues to evolve, these updates highlight the language's commitment to refining and enhancing its capabilities, making it an even more attractive choice for developers seeking to build innovative and efficient applications.

Source: Clojure News
📰 Related News
Ollama 0.2.6 Released with Native Gemma 4 Support and Enhanced Performance
Ollama 0.2.6 Released with Native Gemma 4 Support and Enhanced Performance
Ollama 0.2.6 is now live, featuring native support for Google's Gemma 4 models and improved local inference performance for Windows, macOS, and Linux.
14 Apr
Weekly news roundup: Shortages spread to MLCCs; SK Hynix reportedly in talks with Microsoft and Google
Weekly news roundup: Shortages spread to MLCCs; SK Hynix reportedly in talks with Microsoft and Google
Below are the most-read DIGITIMES Asia stories from the week of April 6-April 13, 2026:
14 Apr
cutile-stencil 0.2.0
cutile-stencil 0.2.0
An xDSL-based stencil compiler that generates optimized GPU kernels via NVIDIA cuTile
14 Apr
merlin-llm added to PyPI
merlin-llm added to PyPI
Merlin — a fast local LLM for agentic coding on Apple Silicon
14 Apr
Fluent Cut - Craft and compose videos programmatically in PHP with an elegant fluent API
Fluent Cut - Craft and compose videos programmatically in PHP with an elegant fluent API
Craft and compose videos programmatically in PHP with an elegant fluent API - b7s/fluentcut
14 Apr
Crypto Investor at Center of Trump Corruption Allegations Now Sees Himself as ‘Victim’
Crypto Investor at Center of Trump Corruption Allegations Now Sees Himself as ‘Victim’
Justin Sun has accused Trump-affiliated World Liberty Financial of misconduct and a general lack of transparency.
14 Apr
nvidia-nat-weave 1.7.0a20260413
nvidia-nat-weave 1.7.0a20260413
Subpackage for Weave integration in NeMo Agent Toolkit
14 Apr
nvidia-nat-s3 1.7.0a20260413
nvidia-nat-s3 1.7.0a20260413
Subpackage for S3-compatible integration in NeMo Agent Toolkit
14 Apr
Social Security Trust Fund to Run Dry in 2032: Just 6 Years From Now
Social Security Trust Fund to Run Dry in 2032: Just 6 Years From Now
Six years. That is how much time separates retirees from a Social Security system that, by its own projections, runs out of money. If you are 56 years old...
14 Apr
cane-gpu-perf added to PyPI
cane-gpu-perf added to PyPI
GPU inference benchmarking with opinionated diagnostics
13 Apr