News for hackers. Stuff that matters.
Re:Show HN: C3 – A C alternative that looks like C by eps on Tuesday July 20, 2021 @04:04AM (#27891119)
Should probably clarify if this is allowed -

  func void Point.add(Abc * p, int x)
  ...
i.e. a method with the first argument of a non-matching type. If it's not allowed, then why not use this ?
Re:Show HN: C3 – A C alternative that looks like C by lerno on Tuesday July 20, 2021 @11:14AM (#27894756)
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.