:this(foo, bar) is syntactic sugar, and you cannot do anything with it, which you cannot do in other ways. However :base(foo, bar) not syntactic sugar, as this is the only way to call this constructor when building a derived class, especially considering that you must first have a fully built base class that executes any invariants defined in this class (e.g. if for some of bar only some values āāof foo valid, then it will throw an exception before moving on).
Method :base(foo, bar) allows classes to use encapsulation to ensure that they never end up in an invalid state, while preserving inheritance, this(foo, bar) just copies the same mechanism as a programmerās convenience when there is common code used by more than one constructor.
Now, let's say we decide that :this(foo, bar) can be called from anywhere. This is essentially a method call. Well, we can still do this in the class constructor. We have lost syntactic similarities with :base(foo, bar) (and we believe that some people are already familiar with this C ++, which lowered their learning curve) and simply added a threat method to a constructor similar to the void return method, adding the complexity of the check is in the constructorās body (and one has to deal with people asking why it canāt be called elsewhere, when now it seems that it should be possible, or itās weirdness to allow it to be done), when people can simply create such methods.
All in all, I think it was a good design decision.
source share