object expression and captured state in F#
问题 What makes the first implementation KO ? type IToto = abstract Toto : unit -> unit { new IToto with member this.Toto = fun () -> () } { new IToto with member this.Toto () = () } 回答1: In the compile representation, there is a difference between property of a function type, compiled as FSharpFunc<unit, unit> Toto { get; } , and a method taking unit and returning unit, compiled as unit Toto() . The first object expression implements a different interface: type IToto = abstract Toto : (unit ->