Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on /story/34556564. Parent comment
sealed interface Option { record InputFile(Path path) implements Option {} record OutputFile(Path path) implements Option {} record MaxLines(int maxLines) implements Option {} record PrintLineNumbers() implements Option {} }
The problem of extending classes is that it can introduce hidden state and also result in non-reflexive equality. But interfaces are fine.
The problem of extending classes is that it can introduce hidden state and also result in non-reflexive equality. But interfaces are fine.