4
devios1
7y

Instead of adopting the ` character to represent multi-line string literals like JavaScript, Swift opts for three consecutive double-quotes. """ smh

Comments
  • 1
    You could say the same about JavaScript not adopting the """ from e.g. Python...
  • 0
    @serpent5 I'll take a single backtick over three characters anyday. What else is the backtick used for?
  • 0
    @devios1 nothing meaningful really. Also, if you don't have an english kb layout, it's hidden. So either you memorize which combination it is, or copypaste it. Sometimes I hate that char so much...

    Also, ever heard of brackets?

    string = (
    "my "
    "string"
    )
  • 0
    @KeyWeeUsr I hadn't considered that it might not be on all keyboard layouts. I guess that's a pretty good reason. Still, """ looks bloody terrible to me.
Add Comment