When you use `with`, do you add a space after it s...
# random
s
When you use
with
, do you add a space after it so it looks like control flow? 1️⃣
Copy code
with (context) {
  foo()
  bar = 42
}
2️⃣
Copy code
with(context) {
  foo()
  bar = 42
}
2️⃣ 19
1️⃣ 3
s
@elizarov I’m aware of the official guidelines, but I was curious as to whether or not this was something the community disagreed with
when I asked “do you” I didn’t mean should you, I meant do you personally make this decision
n
The key thing here is that with is a function (https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/with.html).
3
☝️ 1
h
This, so much! It's part of the beauty of Kotlin that these constructs are "just functions".