[fpc-devel] Feature announcement: Type helpers

Mark Morgan Lloyd markMLl.fpc-devel at telemetry.co.uk
Wed Feb 6 14:45:44 CET 2013


Ludo Brands wrote:

> Funny to see that all these fans of a strongly typed pascal prefer
> Format() that is using variants, has an undetermined number of
> parameters, doesn't give the compiler any opportunity to check the types
> used and causes runtime errors when a wrong type or a wrong number of
> parameters is passed ;)

Format has two parameters. OK, so the second one is a bit weird... :-)

Perhaps somebody would like to correct me, but I think that in the case 
of output messages Format() has the big advantage that the order of the 
placeholders in the string can be changed easily when messages are 
translated from one language to another.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-devel mailing list