Suggestion: Then? Why not With?
mattijsf opened this issue · comments
mattijsf commented
Nice idea!
I personally suggest a different keyword: .with { ... }
UILabel().with {
$0.textColor = .blackColor()
}
Makes a bit more sense.
The keword/idea reminds me a bit of the old VB's With...End With
statement: https://msdn.microsoft.com/en-us/library/wc500chb.aspx
Suyeol Jeon commented
Hi @mattijsf!
Why I chose then
instead of with
is to avoid name conflicts. Because with()
is more general than then()
. That means, other frameworks might have with()
already.
mattijsf commented
Okay! Sounds like you already gave it a thought :)