Feature Request: Calling differently-named superclass constructors
After some experimentation (because the docs aren't super clear), I've discovered that you seem to only be able to call the superclass constructor with the same name as the derived class constructor you're writing. That is to say super() in a named constructor always calls the superclass constructor with the same name. If there isn't one with the same name you get an error.
It would be nice to be able to explicitly call a different superclass constructor by name. For example, if you have a base class with a single constructor and you want to write a derived class with multiple constructors, all of which need to call that same base class constructor.
Syntax-wise, it seems to me you could just allow super.someNamedConstructor() to call a named superclass constructor inside a constructor function. I have no idea how hard that is to implement though.
There's a TODO for that:
https://github.com/wren-lang/wren/blob/dd1e8a00db5e0c9eb9f95dd73ebdae44904cd29d/src/vm/wren_compiler.c#L2476-L2477
I just looked and found that too. I may have a crack at implementing this, although no promises yet as I've not touched any wren vm code before.
What way do you think to implement it?
Because the easy route is to make methods signatures looks like regular
signature, so one can call super.my_constructor_method(...). Though there
is a political problem.