Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This particular restriction is mostly arbitrary anyway because `this` and `super` accept arbitrary expressions (including static method calls), so in most cases it's possible to do this, just with much worse syntax.

Technically, this does introduce new functionality when extending a class, specifically it's possible to choose a constructor to overload depending on arguments, but in most cases there is usually one constructor that all other constructors use.



Isn't it already possible to choose which constructor to overload?


With this change you can add logic to pick the overloaded constructor based on the value of the arguments (as opposed to the sequence of types)


ah yes, based on the value, not the types. Makes sense, thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: