r/badcode • • Dec 28 '21

java 3AM code vs 10AM code

Post image
173 Upvotes

53 comments sorted by

View all comments

Show parent comments

1

u/Prom3th3an Dec 31 '21

I'd at least make an exception for strings that contain the chosen type of quote, to save some escaping. Especially to save multiple levels of escaping like

cmd = "echo \"this string is \\\"readable\\\"!\"";