[fpc-pascal] New feature: IfThen() intrinsic

Jürgen Hestermann juergen.hestermann at gmx.de
Mon Feb 1 18:08:29 CET 2016


Am 2016-02-01 um 16:27 schrieb Michael Van Canneyt:
 > Never, and if Delphi didn't have it, I would oppose its introduction as well. It is a result of a 'whatever goes' attitude.
 > Why not introduce C syntax, while we're at it ? Or Perl, or Javascript or whatever just happens to be the fashion of the day ? The compiler can probably handle it, I'm sure we'll find someone crazy enough to take the task on.
 > This 'whatever goes' attitude is really a disease that should be weeded out.
 > So you trying to introduce it in a system identifier/intrinsic is IMHO a double
 > insult to plain common sense.

I fully agree!
Every *addition* to the language should be thought over carefully
with respect to the spirit of the Pascal language.
In case of doubt just don't implement it (yet).
Such things are cast in stone forever and one wrong
quick shot can bite many people over many years.


If it cannot be avoided to add yet another (superfluous) function to the Pascal language
(and in case someone cares) my thoughts about System."IfThen" are:

1.) It should not have the same name as IfThen from other (Pascal) units. At least the language itself should be as unambiguous as possible.
2.) It should consist of letters only (no operators like &). This would be totally confusing as it would break a long Pascal tradition and would make code less readable.
3.) It should have a speaking name that describes what it realy does.

 From the above I would vote for "InlineIf" or eve better "IfThenElse".



More information about the fpc-pascal mailing list