On 21 Nov 2002 at 10:39, Frank Heckenbach wrote:
[...]
Honestly, what craziness made them add such a feature?
Good question. It may well be that when the Delphi and C++ compilers started using the same backend, they decided to relax some of the restrictions on Pascal - or perhaps it was just easier to let some C- like features remain rather than to remove them from the Pascal side of things. I suspect the latter.
If programmers come from C/C++ to a (slightly) Pascalish language, one might think they would at least want to learn the basics of the language. Otherwise, why don't they stay with C/C++? Even Borland has a C++ compiler, don't they?
You have just opened a can of worms ;-). Yes, they have Borland C++ (which I don't think is being developed as a separate stand-alone product anymore). They also have Borland C++ Builder, which, although housing a standards-compliant C++ compiler, is also basically a C++- based Delphi (i.e., everything is the same with Delphi - except the language you use in coding your methods). Now the can of worms. Borland C++ Builder can compile Pascal code. In fact, it uses the same Delphi VCL (written in Pascal of course) as its class library. So you can freely write Pascal units, etc., and use them in your C++ Builder code.
Should GPC support the "()" additions to functions/procedure calls? I think that for Delphi compatibility reasons alone it might be worth supporting (with all the usual warnings). I would argue that there should be no errors or warnings when using "--delphi" or "--gnu-pascal", but that there should be warnings or errors when using other dialects.
Best regards, The Chief --------- Prof. Abimbola Olowofoyeku (The African Chief) Web: http://www.bigfoot.com/~african_chief/