Hi,
Ah, I did not foresee stuff that far. I only looked at the current spec. But if it's fine in Strong Mode, as currently specified, I'll
keep it that way for now. I'll figure something out when the time
comes, when moving to SoundScript.
I need this basically to implement java.lang.Object.clone() in Scala.js. The good thing is that I know that `o`, the object to clone, is an instance of a Scala.js-generated class, so I know a few things about it, in particular, I know that its constructor() only creates the fields, and does nothing else.
I guess, even if SoundScript supported constant and private attributes, Scala.js wouldn't emit those. Constants doesn't really work when you need overloaded constructors, which need to be implemented as several "init" methods. And private fields would hinder a lot of the optimizations that Scala.js does before emitting JavaScript.
So maybe I'm fine with the not-future proof aspect, at least for now. Worst comes to worst, I would add an additional "init" overload to all classes to create-clone from another object.