A soft IntelliJ inspection for "function could be ...
# getting-started
y
A soft IntelliJ inspection for "function could be marked `inline`" when a function has lambda parameters and uses them in an
inline
-y way would be nice!
➕ 1
j
Isn't that every function? I think that might have an unfortunate side effect of encouraging people to collapse complex stuff into a single mega-function. It wouldn't be enough that "people can disable it" cos people dont know, and don't. Usually we try to encourage folks to split out things into smaller private methods, so as to simplify things... The compiler or runtime will do it anyway.
💯 1
k
Indeed, I’ve spent the last 10 years convincing people to split it into smaller methods with a clear name and intent so that the people reading the code can stop at a certain level of abstraction. This would just give them an argument to not do it if “even intellij says it should be inlined” sweating
y
My bad, I phrased this badly. I meant could be marked
inline
and specifically when there's a lambda argument!
👍 1