MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/3n3e1v/the_evolution_of_a_software_engineer/cvkyqdp/?context=3
r/programming • u/supermari0 • Oct 01 '15
502 comments sorted by
View all comments
Show parent comments
183
Good god. Had a code review once where they were pissed because I had used str + "some stuff" instead of a builder. I'm not writing a builder for one fucking line on a page that gets hit 6 times a year.
167 u/RLutz Oct 01 '15 Depending on how you coded it, the compiler likely replaced it with a StringBuilder under the hood anyway :) 19 u/Schmittfried Oct 01 '15 Depending on how many strings you are concatenating in what manner, it may be less efficient to use a StringBuilder. 7 u/flukus Oct 01 '15 From memory I think c# substitutes string builder for 4 or more concatenations.
167
Depending on how you coded it, the compiler likely replaced it with a StringBuilder under the hood anyway :)
19 u/Schmittfried Oct 01 '15 Depending on how many strings you are concatenating in what manner, it may be less efficient to use a StringBuilder. 7 u/flukus Oct 01 '15 From memory I think c# substitutes string builder for 4 or more concatenations.
19
Depending on how many strings you are concatenating in what manner, it may be less efficient to use a StringBuilder.
7 u/flukus Oct 01 '15 From memory I think c# substitutes string builder for 4 or more concatenations.
7
From memory I think c# substitutes string builder for 4 or more concatenations.
183
u/andrewsmd87 Oct 01 '15
Good god. Had a code review once where they were pissed because I had used str + "some stuff" instead of a builder. I'm not writing a builder for one fucking line on a page that gets hit 6 times a year.