[fpc-pascal] Optional param modifier

Marco van de Voort fpc at pascalprogramming.org
Fri Apr 12 20:55:54 CEST 2019

Op 2019-04-12 om 17:23 schreef Ryan Joseph:
> What do you think of that? Sounds like an easy way to get some support for nil pointers deref’s and provides self documenting code.

I think the same as when I read the suggestion for an inout variant of 
VAR. Move this out of the language syntax, and make it directives or 
attribute like syntax (like we will need to get anyway for const ref).

As to the functionality itself, IMHO it is a solution in search of a 
problem. Yes, it theoretically nails down the contract a bit more, but I 
rarely expect that this makes programming in pascal any easier.

It all is too much topdown, assuming that you can oversee all extensions 
and problems into the far future when definining a procedure.

I think the time can be better spent in making better debug tools and/or 
static analyser tools for what there is than bother the language with 
syntax that fixes only hypothetical corner cases.

More information about the fpc-pascal mailing list