https://kotlinlang.org logo
#announcements
Title
# announcements
j

jcogilvie

10/06/2017, 4:05 PM
fair point. basically this is ported from a java String.format() call, which is more efficient than string literal concats iirc, so I guess I'm still trying to avoid the latter. not sure if kt improves java in that regard?
h

hho

10/06/2017, 4:08 PM
AFAIK String literal concats are compiled (in Java) to
StringBuilder.append(…)
and are quite efficient.
☝️ 1
j

jcogilvie

10/06/2017, 4:12 PM
well, I guess I've been thinking in C all these years. concat is much faster than string format. TIL. https://stackoverflow.com/questions/925423/is-it-better-practice-to-use-string-format-over-string-concatenation-in-java/925444#925444 and string format is largely preferred for localization.