@[email protected] to [email protected]English • 1 year agoTyping is not a programming bottleneckblog.ploeh.dkexternal-linkmessage-square38fedilinkarrow-up1106arrow-down117
arrow-up189arrow-down1external-linkTyping is not a programming bottleneckblog.ploeh.dk@[email protected] to [email protected]English • 1 year agomessage-square38fedilink
minus-square@CatPooplinkEnglish12•1 year agoAssuming this is C#, you could just make Reservation a record type, which can be defined with a one line primary constructor, is immutable and has value type equality. Second example is an insane amount of boilerplate.
minus-squarecopygirllinkfedilinkEnglish3•1 year agoAnd you can use the with expression to create clones of the object with some properties modified.
Assuming this is C#, you could just make Reservation a record type, which can be defined with a one line primary constructor, is immutable and has value type equality. Second example is an insane amount of boilerplate.
And you can use the
with
expression to create clones of the object with some properties modified.