top | item 41630399

(no title)

nicoty | 1 year ago

I'm not familiar with Java. Does it have no notion of structural types at all? If it does, maybe you could wrap those fields in `Car` with `Maybe`/`Option` (I’m not sure what the equivalent is in Java) so you get something like `Car(Maybe Make, Maybe Model, Maybe Year, Maybe Colour)`?

discuss

order

spullara|1 year ago

yes and it is called Optional (rather than Maybe)