Re: [fpc-pascal] class contracts [[was: Re: Optional param modifier]]

2019-04-15 Thread Martin Frb
On 15/04/2019 09:41, Sven Barth via fpc-pascal wrote: Am 14.04.2019 um 23:48 schrieb Martin Frb: As for "documentation". I disagree with the way it is done in oxygen. But I am not sure I have any good alternative. For me a class contract (require/ensure) is part of the interface. Putting them

[fpc-pascal] class contracts [[was: Re: Optional param modifier]]

2019-04-15 Thread Martin Frb
On 15/04/2019 09:41, Sven Barth via fpc-pascal wrote: Am 14.04.2019 um 23:48 schrieb Martin Frb: type   TFoo= class function DoTheFooThing(Foo1, Foo2: TFoo): Tbar;     requires    assigned(Foo1) or assigned(Foo2): 'Need at least 1 foo, for the connection';     guarantees /