For this class definition:
type Foo(f1: int, f2: string) =
member x.F1 = f1
member x.F2 = PostProcess f2
Will PostProcess (some string manipulation function) gets called every time f2 is accessed? If the answer is yes and I want to avoid it, what’s the right idiom? Is this one below recommended? It is a bit too verbose for me.
type Foo =
val F1: int
val F2: string
new (f1, f2) as this =
{F1 = f1; F2 = f2;}
then this.F2 = PostProcess(f2) |> ignore