(A reply to several mails, and a little rant ... ;-)
Prof. A Olowofoyeku (The African Chief) wrote:
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
As I said already on other occasions, syntax has nothing to do with the backend (code generation) -- unless they have a very confused architecture.
- 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.
You mean their "Pascal" compiler (frontend) is not based on their previous "Pascal" compilers, but on the C compiler? This might explain some things. ;-)
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.
You mean what Borland likes to call Pascal ...
On 21 Nov 2002 at 15:39, Marco van de Voort wrote:
[...]
IMHO it is no use to support a subset of a dialect (e.g. Delphi), and not at least strive to go all the way in the long run.
Compability is of little use in practice if it requires more changes than once every 100 lines. (and that is libraries + language)
(one can of course strive for a lesser version than the newest Delphi version at first)
I agree. This discussion does raise a fundamental question - should GPC aim for Delphi-compatibility at all?
Indeed, that's the main question.
BP is a closed target, and therefore BP compatibility alone might not lead us anywhere except to provide a fixed point of reference - the same goes for ISO 7185 and ISO 10206. They are all not going any other place anytime soon.
But once we have these fixed reference points as a lowest common denominator and a convergence point for all Pascal implementations, then what next?
I wouldn't exactly call the union of ISO 7185, 10206 and BP a "lowest common denominator". ISO and BP are far enough apart, so this covers quite a range of features, and maybe with one or another occasional extension it should be suitable for quite a wide range of applications.
Though I can imagine that the `class' model might be a little easier to use than `object's, I don't see the really big advantage in it yet, and much less so for most other Delphi features I've seen so far (well, exceptions perhaps ...). Most of them -- especially, of course, such syntantic additions like `()' that add nothing to the expressiveness of the language -- only look like feature bloat.
Delphi is a moving target (and it is the only constantly evolving "standard")
I wonder if it's really evolving (for any definition of evolution that does not offend Darwin ;-), or if they're merely adding useless features desparately, just to get a justification for a new version. I don't know Delphi myself, but what I've seen recently sounds more like the latter ...
Their architecture looks rather mixed-up and confused to me, so much that even MS's one might be cleaner, and I wouldn't be surprised if they get overtaken and kicked out by them soon ...
and we might well decide to ignore it totally (either because it is too hard to keep up with, or because we don't like where it is going, or for any other reason). But if we don't ignore it completely, then what do we do? Supporting "()" is a small matter that doesn't add much to the GPC compiler, but it could become a real pain not to have it if we are to try and use free Delphi code that will increasingly make use of the feature.
BTW, does there exist a substantial amount of free Delphi code (which is not Windows only)?
It is an un-Pascalish thing to support - but does this mean that we should ignore it, or treat it as a leprous extension that should be viewed with disdain? Perhaps - but there may well be other things that will be added to Delphi in the future that we might dislike even more. So we still need (IMHO) to make a fundamental decision - is Delphi-compatibility worth striving for? If the answer is "yes", then I don't think that we can pick and choose which features we like to support. If the answer is "no", then we might as well stop adding any more Delphi- compatibility features.
Agreed. If anything, it would be stupid to ignore the easy features and try with the difficult ones, that's for sure. The `()' syntax is almost a non-issue I suppose, but do we want to imitate all strange features that appear (and will appear in the future) in other compilers?
It is of no consequence to me personally which way the decision goes, since I have Delphi and Kylix and I can use them if I want for Windows and Linux programming.
Sure, if you like your home and computers searched and that sort of things (http://freshmeat.net/articles/view/369/) ...
As long as it doesn't interfere with "normal" Pascal, I don't see what the issue is, other than the effort to add it - which would be the effort of someone who wants the compatibility....
This is where the "but" comes in. AFAIK, Peter is the only one who really knows all the deep internals of the compiler. Frank is the next most knowledgeable person, but might still require Peter's assistance on occasion. Other people know a bit about this or that, but, realistically (at present) only Peter and Frank have the knowledge to maintain any part of the compiler.
Fortunately now Waldek has started to contribute code (especially for the gcc-3 port, and those changes affected large parts of the compiler). I don't know how hard it was and how long it took you to get enough overview of the internals, and if you feel ready yet to maintain any part or add features (or if you want to do that at all), but I admit it's a little difficult getting started. (Though I'm trying to simplify the internals wherever possible, so some things are now a little less difficult than they used to be, but it's a long way ...)
So, when a feature is requested "for GPC", this is merely short-hand for saying "Frank, would you please do it?". Frank needs to have a life (and I am sure he does!)
I'm trying to, thanks. ;-)
Frank