3 ms·
Why not simple subclasses? E.g. class Truck extends Vehicle. From the article, the argument would be that "everything in one file" is desired, so you can e.g. p
by qznc 12y ago
Why not simple subclasses? E.g. class Truck extends Vehicle. From the article, the argument would be that "everything in one file" is desired, so you can e.g. parse it from other or for other languages.
There are also the downsides of the table approach. What does avg_km_per_liter mean for e-cars? With multiple classes they can have different fields.
Everything is a tradeoff.