Sam
06/20/2024, 10:26 AMwith(foo) bar()
instead of with(foo) { bar() }
. I'm sure there are any number of reasons why the grammar wouldn't work, but I still think it'd be cool 😄CLOVIS
06/20/2024, 10:42 AMSam
06/20/2024, 10:44 AMfoo.bar(baz())
and foo { bar { baz() } }
.CLOVIS
06/20/2024, 10:45 AMwith(foo)
bar()
is already ambiguousSam
06/20/2024, 10:46 AMwith(foo)
could just be a single-arg function callSam
06/20/2024, 10:46 AMCLOVIS
06/20/2024, 10:47 AMwith(foo) <- bar()
Sam
06/20/2024, 10:47 AMephemient
06/20/2024, 6:08 PMwith(foo): bar()
Youssef Shoaib [MOD]
06/20/2024, 8:06 PM@with(foo) bar()
Or maybe we could only do it with other decorators but we still need a lambda for the expression?
@with(foo) @with(baz) bar()
CLOVIS
06/20/2024, 9:37 PMcontext val foo
context val baz
bar()
from the context receiver proposal—though it doesn't seem to have made it to the new oneYoussef Shoaib [MOD]
06/20/2024, 11:36 PM