scala-js/scala-js-dom

vals for KeyCodes?

japgolly opened this issue · 3 comments

@sjrd Question about efficiency here. We have:

object KeyCode {
  val backspace = 8
  val tab = 9
  // etc

Is there effeciency to be gained by changing to final vals?

I was thinking @inline def would be best but then they can be used in pattern matching.

sjrd commented

final val is best, indeed.

Cool, I'll make another PR for this after we finish with #103.

Lumped into #105