このクラス定義の場合:
type Foo(f1: int, f2: string) =
member x.F1 = f1
member x.F2 = PostProcess f2
f2にアクセスするたびにPostProcess(文字列操作関数)が呼び出されますか?答えが「はい」で、それを避けたい場合、正しいイディオムは何ですか?これは以下の推奨事項ですか?それは私には少し冗長すぎます。
type Foo =
val F1: int
val F2: string
new (f1, f2) as this =
{F1 = f1; F2 = f2;}
then this.F2 = PostProcess(f2) |> ignore