I thought about it, but I also wanted to be as close as possible to what is allowed in JS. Using objects (or even functions) as key is possible even if it may have surprising behaviors. I can make it safer in js-scala, it would enforce a better programming style.