StardustPL / Stardust

"A programming language that doesn't make me angry to use it."
https://StardustPL.GitHub.IO/
The Unlicense
4 stars 0 forks source link

Planning: override vs overrides #35

Open LB-- opened 8 years ago

LB-- commented 8 years ago

override will ensure a member function correctly overrides a member function in a parent class with the same signature and compatible return type. overrides allows to specify the signature of the overridden function so that the overriding function can add more optional parameters or widen the accepted range of values for the existing parameters.

LB-- commented 8 years ago

...and to allow rich return type covariance. E.g. the function can return more information than the function it overrides and the extra information is just thrown away if not used.