Re: [swift-evolution] Add a `clamp` function to Algorithm.swift

2017-03-10 Thread via swift-evolution
Hi, I think a func such as clamped would be helpful. to be frank, I had made some mistakes when trying to compose min and max correctly. Robert Bennett via swift-evolution 于2017年3月11日周六 下午1:35写道: > I can't argue with that. I guess I was really only opposed to using

[swift-evolution] What about a VBA style with Statement?

2016-04-13 Thread via swift-evolution
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 ```swift with textLabel{ .textAlignment =