Why are ES6 template strings the way they are?

What are the reasons that we have to use:

  1. ` instead of ‘, and

  2. ${var} instead of $var (like e.g. in Kotlin)

  1. backwards compatibility: you don’t want existing programs using single quoted strings to suddenly behave differently because they are now interpreted as template strings.
  2. Too often a dollar sign may need to be literal. To avoid that you would have to escape it often, ${ } is prescribed: it is a less recurring pattern you would want to produce literally in strings.