[fpc-devel] Idea/question about a language (syntax) extension

Flávio Etrusco flavio.etrusco at gmail.com
Tue Dec 22 05:30:04 CET 2009


Hi all,
I want to propose a syntax extension for the compiler to check
parameters' name on function/procure calls. Would such a patch be
accepted? Does anybody have a suggestion for the  syntax? (i guess
something along the line of a compiler directive to go together with
the parameter value to avoid syntax incompatibility...)

Rationale:
I guess it's in "everybody"s interest to make auto-generated code and
code refactor more robust; For example, when populating DTOs (data
transfer objects) one have two options: assign each field by name and
run the risk of "forgetting" to initialize some field, or make a
constructor/initializer method and run the risk of changing order of
parameters of the same type.
What do you think? Any alternatives?

Best regards,
Flávio



More information about the fpc-devel mailing list