[fpc-pascal] Optional param modifier

Ryan Joseph ryan at thealchemistguild.com
Sun Apr 14 00:17:35 CEST 2019



> On Apr 13, 2019, at 6:01 PM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
> Well, there is Oxygene's concept of Class Contracts (see
> https://docs.elementscompiler.com/Concepts/ClassContracts/ ), so if
> anything in that direction would be done I'd be inclined towards their
> syntax (and I've played with the idea to implement this in FPC for quite
> some time already).

That’s an interesting idea. It’s certainly common that you test for these conditions at the top of the function and have bail out conditions so it makes sense to pull it out into syntax. But it has to rely on exceptions and all that overhead? That’s not so great if so.

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list