varargs in GPC_(re)

Thu, 13 Mar 1997 18:43:04 GMT



Berend de Boer wrote:

> I think if you really want var args, function overloading, powerfull
> preprocessors, etc. program in C or C++.

> Don't fool with Pascal's identity.

I don't agree. I don't think things like varargs, overloading etc. are
inconsistent with Pascal's identity if properly implemented. What is part
of its identity, IMHO, is e.g. strict typing and type checking at compile
time. Of course, this is an issue with varargs and overloading and is has to
be carefully considered, so that all type checks can be made at compile time
and no ambiguities will arise.

These features can make programming easier and more comfortable (if used
properly, of course), so see no reason no to have them (except not to have
the time to implement them...)

OTOH, preprocessors, AFAIK, are not part of any language at all, as the same
preprocessor can be used for C and Pascal. However, C needs a preprocessor
because certain features (constants, modularisation) are not present in the
language itself. I think a (sufficiently sophisticated) Pascal should not (or
at least very rarely) need a preprocessor, so in this regard I agree with you.

> And I think 99.9% of what people want with varargs can be quite cleanly
> implemented with Borland's open array and with variant arrays

... and with schema types when they're there.

> (boy, I need to
> use them sometimes, but it's quite bad to let the customer find typechecking
> bugs...)

I'm not completely sure what you mean here, but it sounds like a case where
typing errors are not detectect at compile time but at run time. Exactly this
is what I want to prevent by the mechanisms I suggested - mainly because I'm
not very content with Borland's open arrays and absolute variables.
-- 
Frank Heckenbach, Erlangen, Germany
heckenb@mi.uni-erlangen.de
Turbo Pascal:   http://www.mi.uni-erlangen.de/~heckenb/programs.htm
Internet links: http://www.mi.uni-erlangen.de/~heckenb/links.htm


Frank Heckenbach (heckenb@mi.uni-erlangen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es