Would be nice if extension functions for `Sequence...
# stdlib
e
Would be nice if extension functions for
Sequence
were annotated with
@Terminal
or something like that to allow easier creation of automated checks for expressions that don't do anything because the developer forgot to call a terminal operation. Me and my team just spent ~2 hours trying to figure out why our code wasn't working after replacing a
forEach
call with
map
. A detekt rule / IntelliJ inspection would help a lot in this case.
👍🏻 1
👍 2
e
Exactly
j
You can suggest it in #detekt channel, it is interesting
👍 1
l
I think it's more a language design thing (rather than solely stdlib). The use case seems reasonable, and it also affects Flows and many other APIs, so I'm curious about @elizarov's current stance on that.
e
👍 3