xwu
(Xiaodi Wu)
May 12, 2026, 2:48am
3
tera:
Alternative 2. Use Kotlin-inspired apply function
I see we're circling back to probably the second -most discussed topic in Swift Evolution history--perhaps we'll be able to boost the number of comments beyond that for implicit last return this time?
I've linked to the pitch here.
Do people want this in the standard library? This is my first pitch.
Over the past couple of days, the Twitters have discovered some work I'd done on closure-based setup.
It's clear that a demand is out there and strong for this kind of behavior, even without implicit `self` as
part of the mix or cascading. In that light, I've put together the following:
If the community demand is this high, I think we should re-consider pushing it before 3.
Feedback as always welcome, including criticism.
-- E
Introducing with to the Standard Library
Proposal: TBD
Auth…
I recently learned some VBA and I found a very conveniently `with`
statement.
`with` statement can be helpful to set property for UIKit instance.
for instance a UILabel instance `textLabel` ,with `with` statement we can
set UILabel property like this
with textLabel{
.textAlignment = .Left
.textColor = UIColor.darkTextColor()
.font = UIFont.systemFontOfSize(15)
}
There are sure to be many more relevant threads, but it gets harder to dig up as we go further back; as early as 2016, it was already said:
2 Likes