back

by lerno·5y ago·view on hn ↗
I deliberately removed the "static" methods, so that above would not be allowed. Why I found that to be a good idea is a longer discussion.

The main motivation why it is nice to have it this way is that it's straightforward to understand what the type is when doing `&Point.add`. I have considered a `this` but it's not felt super important to have. Also, note that this is allowed: `Point *x = null; x.doSomething();` - this is made more obvious by taking the reference as an explicit parameter.