[Pitch] Allow default parameter overrides

This is a tricky problem. I can see how it's confusing.

However, "I am the superclass" is part of the signature of mySuperClass.printStatement and not just its implementation. Overrides shouldn't change signatures. It stands to reason that when I call the function without an argument on a variable of type mySuperClass, I should get the default I see in the signature.

The consistent solution that would prevent confusion would be to make it an error to supply a different default in the subclass, but that seems like a big hammer.

2 Likes