I think it got lost because I made these comments as part of a very long post, but the property wrapper usage above doesn't actually fit well with the design of property wrappers (or properties in general). When you have a let
or var
, the type of the pattern and the type of the initializer expression expression are supposed to match:
let <pattern> = <initializer-expression>
Property wrappers codify this notion intentionally: the wrappedValue
property and init(wrappedValue:)
parameter type are meant to match. This property-wrapper formulation being discussed:
@async let foo = { expensiveComputation() }
violates that basic principle: foo
is of type T
, but the initializer expression is of type () -> T
.
Only if those features are desirable and generalizable. My laundry-list of new features we'd need to invent contains some that are almost certainly not something we would ever want (e.g., async
deinitializers).
Your if
statement argument is an odd straw man. This isn't "eliding braces", it's "make the initializer type line up with the pattern". If I have this:
func f() -> Int { ... }
let x = { f() }
should I expect x
to have type Int
? I sure hope not, so why would I assume that for
async let x = { f() }
or
@Future let x = { f() }
?
AFAICT, there is exactly one thing you can put before let x = y
that would make the types of "x" and "y" not line up, and you complained about as part of this same thread: if let
. if let
lets the types of x
and y
differ because the former is the unwrapped form of the latter's optional type, a little convenience that we now regret. Requiring braces on the right-hand side of async let
or @Future let
makes precisely the same design mistake.

My metapoint is that this proposal is presented without alternatives - there is no exploration of the design space, and it isn't clear to us community members what attempts to leverage existing language affordances have been made. Furthermore, the design of this feature has not evolved significantly since its original pitch many months ago (even though the base language has taken significant changes) so I don't have a lot of confidence that this was "first-principled" since then.
So, I have a pretty big problem with this paragraph above. I wrote a fairly detailed write-up covering a number of problems with the property-wrappers approach, and it got ignored. We did explore the property-wrappers approach in depth because this felt like something that should be possible with property wrappers. It's no accident that Swift 5.4 got support for property wrappers on local variables: it was a step toward using property wrappers here. We redirected effort toward completing effectful properties ahead of more foundational concurrency-related changes because it was another step toward using property wrappers here. We explored this path, and our initial intuition was wrong. async let
is different enough and important enough to require its own language support; the review proposal looks like the first pitch because the first pitch was close to the right design.
I don't know if any of those things improve your "confidence", but at the very least you could respond to the specific points that have been made against the use of property wrappers rather than asserting that those points haven't been made.
Doug