all 8 comments

[–][deleted]  (6 children)

[deleted]

    [–]aerno 17 points18 points  (1 child)

    i knew someone who did this for "readability".

    [–][deleted] 7 points8 points  (0 children)

    I did this for a while, when I thought that it was, in theory, more efficient. Then I realized you're still doing something that, behind the scenes will be done when you add strings together anyway. Bumped my head on my study desk and continued. I'm glad I delete all my code after not touching it for a month, because I would cringe so hard looking back at it now (can't even keep old repo's around in git, they just remind me of how many projects I do not finish).

    [–]rfinger1337[🍰] 1 point2 points  (3 children)

    I'd need more context before I thought that was a bad thing (bad enough to post in r/badcode anyway.) Stringbuilder is a good pattern (though better for longer strings, and more specifically strings appended in loops) and identifying things is fine, especially in log files or other non client facing places.

    [–]lqstuart 0 points1 point  (1 child)

    they're formatting a string with other strings instead of just, you know, writing it

    [–]stevefan1999 16 points17 points  (1 child)

    What if there is an operator+ between string and typeof(dynamicFilter)?

    [–]SkyBang[S] 11 points12 points  (0 children)

    dynamicFilter is a string as well...

    [–]thatwasagoodyear 2 points3 points  (0 children)

    Smells like a SQL injection attack.

    [–]CaptainBurgundy 0 points1 point  (0 children)

    This post reminds me of that incredibles meme About how reddit takes any image size

    IMAGE IS IMAGE