You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kotlin has string templates, e.g. "Hello, $person!" where person can be some string. I wonder: how does such a string with template perform when passed to Timber, compared to a string formatted with arguments like so: Timber.v("Hello, %s!", person)? Is there a noticeable/significant difference between the two?
Therefore, should Timber's lint rules warn about string template usage?
Or on the contrary, should strings with formatting arguments in Kotlin files result in a warning that they can or should be replaced with templates?
Another thing to consider is a mention in the Timber docs about this: which of the two methods is preferable?
Kotlin string templates are an idiomatic language feature and may therefore be preferable. I'm unaware of the underlying compile-time/runtime details of string templates, which may be different per Kotlin platform.
This is related to a few other issues where Timber-Kotlin interop is discussed.
The text was updated successfully, but these errors were encountered:
Kotlin has string templates, e.g.
"Hello, $person!"
whereperson
can be some string. I wonder: how does such a string with template perform when passed to Timber, compared to a string formatted with arguments like so:Timber.v("Hello, %s!", person)
? Is there a noticeable/significant difference between the two?Therefore, should Timber's lint rules warn about string template usage?
Or on the contrary, should strings with formatting arguments in Kotlin files result in a warning that they can or should be replaced with templates?
Another thing to consider is a mention in the Timber docs about this: which of the two methods is preferable?
Kotlin string templates are an idiomatic language feature and may therefore be preferable. I'm unaware of the underlying compile-time/runtime details of string templates, which may be different per Kotlin platform.
This is related to a few other issues where Timber-Kotlin interop is discussed.
The text was updated successfully, but these errors were encountered: