4 ms·
not quite, since `a + b != b + a` feels a bit weird.
by cttet 5y ago
not quite, since `a + b != b + a` feels a bit weird.
- dataflow 5y agoI think you missed the other thread... https://news.ycombinator.com/item?id=30081517 https://news.ycombinator.com/item?id=30081517
- cttet 5y ago(a, b) would make more sense if then. Jokes aside, + also quite break the reading flows of the string such as user_name + ": " + attr1 + "| " + attr2 + "\n" is more difficult to parse by eyeball for me then concat(user_name, ": ", attr1, "| ", attr2, "\n")
- dataflow 5y agoI mean sure, but the fact that you had to write 6 strings to illustrate this should tell you something, right? This user_name + ": " + attr1 is easier to eyeball than concat(user_name, ": ", attr1)
- cttet 5y agoTo me they are similar though. I used Python quite a lot, for string concatenation, I mostly use fstrings. `+` is used mostly in the `+=` case.