Comment

Comment by joachimma

> These include statements before super(…), which would give developers greater freedom in expressing constructor behavior – meaning string templates. This would make it easy to express strings that include values computed at run time – meaning scoped values. This would enable sharing of immutable data within and across threads; and implicitly declared classes and instance main methods.

I don't like the restriction on code before super. But I don't have a clue what they are referring to here. The code example doesn't use a template either.

  PositiveBigInteger(long value) {
    if (value <= 0)
      new IllegalArgumentException("non-positive value");
    super(value);
  }
parent joachimma 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton