just saw a nice trick to avoid ambiguity about `it...
# random
e
just saw a nice trick to avoid ambiguity about
it
by silencing the latter with
_
Copy code
call.details.map { 
    i18nClient.takeIf { _ -> !it.isMarked }
s
I don't think this is good style. 🤔 In this case I would go for
Copy code
call.details.map { detail ->
    i18nClient.takeIf { client -> !detail.isMarked }
}
just to make clear was
it
is.
Or just
Copy code
call.details.map { detail ->
    i18nClient.takeIf { !detail.isMarked }
}
👍 3
I have to admit that I'm not a big fan of using
it
in general
e
I'd say it depends by the context
🤔 1
s
In the context of your example it doesn't strike me as good style.
d
I also don't allow
it
in my code - I always do one of: • Give a proper label - usually makes the code read much better IMO • Use a function reference so that there's no exposed lambda to label
👍 1