|
|
|
|
|
by JoshTriplett
3321 days ago
|
|
You wouldn't need significant whitespace to do this; any block syntax would work. The following, for instance, would still drastically reduce the noise: enum Tree[T] {
Branch(t: Tree[T])
Leaf(t: T)
}
The main benefit here involves using a block instead of "extends", and using "enum" instead of the odd use of a class hierarchy. |
|