SE-0492: Section Placement Control

The proposal introduces lazy let variables:

@section("__DATA,colocated") lazy let data1: Int = 42 // ✅
@section("__DATA,colocated") lazy let data2: Int = Int.random(in: 0 ..< 10) // ✅

which is a long requested feature in general, most recently in It's 2025, can we have a “lazy let”? - #32 by michelf .

But there seems to be no discussion on its use outside of @section(…) annotations. Is lazy let intended to be allowed elsewhere too, or should there be at least a mention about it in future directions?

1 Like