rednifre
07/10/2023, 10:20 AMfor (e in stuff) {
val foo = bar(e)
...
}
Less allocations? Or unnecessary optimization?:
var foo: Foo
for (e in stuff) {
foo = bar(e)
...
}
ephemient
07/10/2023, 10:26 AMrednifre
07/10/2023, 10:26 AMSam
07/10/2023, 10:26 AMephemient
07/10/2023, 10:27 AMrednifre
07/10/2023, 10:29 AMe
the loop variable? I was asking about variables scoped to the block of each iteration?ephemient
07/10/2023, 10:33 AMephemient
07/10/2023, 10:35 AMephemient
07/10/2023, 10:38 AMVampire
07/10/2023, 3:04 PM