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.

7 April 2026 at 09:01 am
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 the behavior of functions marked with the `:once` metadata. These improvements are crucial for developers working with Clojure, as they help prevent memory leaks and ensure the correct handling of recursive functions.

The first fix, CLJ-2145, resolves a problem with the clearing of 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 references the outer bindings. By addressing this issue, Clojure 1.11.4 ensures that these closed-overs are now clearable for garbage collection, preventing such memory leaks.

The second fix, CLJ-2317, tackles a situation where using `recur` to return 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`, leading to unexpected 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 within 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 fixes in Clojure 1.11.4 are essential for developers who rely on the language's garbage collection features and the `:once` metadata for optimizing performance. By resolving these issues, the new version provides a more stable and predictable runtime environment, reducing the likelihood of memory leaks and unexpected behavior in recursive functions. As Clojure continues to evolve, these improvements reinforce its reputation as a powerful and efficient functional programming language.

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