Did this not work before? or is this new thing jus...
# announcements
s
Did this not work before? or is this new thing just a shorthand for doing the same?
s
I mean it worked but is a little more repetitive than it needs to be
some folks were asking for lambda-style implicit
it
others were proposing notions like
when (fetchNextRequestFromQueue() as nextRequest)
that one I’m not so fond of
s
oh no i like this much better than
it
for sure. I think i'm still stuck in java ways and sometimes am against the "less verbosity" just for the sake of it, so some of the design/coding standards decisions still baffle me is all.
s
but the implicit
it
would be kinda nice when you have to use the result in the when block
I mean, it’s still kinda verbose lol
can’t use it without
val
, and you’re encouraged to give your variable a proper name
s
thanks for the info, i just wasn't sure if it was a sort of shorthand or if the original when block couldn't use the subject on the simple case like
when(nextRequest)
k
The old way to do this also leaked the variable into the entire scope.
s
yeah we talked about that a bit in the main channel, i can see that being quite useful.
k
Haha just noticed that as well, I should wait with replies until I've caught up 🙃
s
lol no worries, getting answers x2 > not getting answers at all 😄