class NamedPoint
cue init(name as String, x as int, y as int)
...
cue init(x as int, y as int)
...
class MyNamedPoint inherits NamedPoint
pass
You should be able to do this out of the box:
p = MyNamedPoint('origin', 0, 0)
q = MyNamedPoint(1, 1)
In fact, there is no reason to believe that a parameterless initializer is a good guess when the base class does not have any. Previously, you could not make those calls without stubbing out a "cue init" in the subclass for every base init by hand.
Note that as soon as you declare even one "cue init..." then none of the base class initializers are inherited. This enables you to dictate exactly how a class' objects are to be initialized.
It's unlikely that this change breaks existing code. You would need to have:
-- a class with no "cue inits", and
-- you are are instantiating it, and
-- the base class has no parameterless init
Nevertheless, I also included a "cobra -legacy-one-default-initializer ..." option to get the old behavior back if (a) you do experience a break and (b) don't want to update your current code.