wuwuxin 28 Posted November 23, 2021 {$M+} ReadOnlyObservable<T> = reference to function: T; Observable<T> = interface(ReadOnlyObservable<T>) {$REGION 'Property Accessors'} procedure Invoke(const value: T); overload; {$ENDREGION} procedure Subscribe(const action: TAction<T>; trigger: TNotifyTrigger = AfterChange); end; The above is taken from @Stefan Glienke's Knockoff project https://bitbucket.org/sglienke/knockoff/src/master/Knockoff.Observable.pas Can someone give me some heads up - is this some type of advanced usage of Delphi? can "reference to functio: T" be used as the base interface? Share this post Link to post
DPStano 15 Posted November 23, 2021 (edited) https://stackoverflow.com/questions/39955052/how-are-anonymous-methods-implemented-under-the-hood https://sergworks.wordpress.com/2010/01/27/anonimous-methods-in-delphi-the-internals/ Edited November 23, 2021 by DPStano 2 Share this post Link to post