On 23 Nov 2002 at 1:46, Frank Heckenbach wrote:
[...]
That's quite a difference. "Law" is a word from common language and has developed in cultures etc. "Pascal", OTOH, (in this context) is the name that Wirth gave to a language he designed, therefore it's a well defined term, not subject to opinions. (The language was later revised in the standard, but it only made some clarifications and did not really deviate from the original language. The later standard is called "Extended Pascal" -- rightfully, since it's strictly an extension and includes the previous version completely.)
To say it again, I think it's quite impertinent to create a mutilated form of the language and claim that the result is the real language.
I don't think that Borland ever claimed that their Pascal was "the" Pascal.
It's quite unfortunate that in this society, apparently Wirth would have had to get a trademark and sue Borland to prevent such an abuse. But to be fair, I'm not sure if Borland actually made this claim (though many users do, mostly out of ignorance I guess). It may be that Borland only talked about the "Turbo Pascal" and "Borland Pascal" languages or similar, which may be acceptable and could be read as describing a dialect (but still bears the confusion to be understood as the Pascal language by Borland).
Is the following code "Pascal" or not?
program foo (input, output); type bar = record bar1 : integer; bar2 : char; end; type mybar = (here, there, where); Var b1 : mybar; b2 : bar; begin with b2 do begin bar1 := 10; bar2 := 'C'; {do whatever} end; end.
All versions of Delphi and BP compile it. If they do, then they are "Pascal" compilers. Is this phrase Spanish? "Me gustaria tomar flan". Yes, it is. Of course it isn't all the Spanish that exists, but no-one can say that it is not Spanish because it doesn't contain subjunctives or the whole of the Spanish vocabulary. Is my Spanish any less Spanish because it is not perfect or complete? I doubt it. Else many people on this list will not be taken as writing "English". BP and Delphi do not support everything in Wirth's language - and they contain extensions that are not in Wirth. Does that make them "not Pascal"? IMHO, no. "How do you do?" is English - incomplete as it is. Therefore I conclude that BP and Delphi are "Pascal", albeit incomplete implementations with extensions.
[ About the usefulness of `()' ]
So why did the persons who invented the word "compiler" or "computer" or any other new English word bother to do so? And if they never did it, how would we describe today what I am now typing on, or the software that you and Peter work so hard to maintain?
So these words have a meaning, as you describe. I still haven't seen any practical usefulness of the `()' feature.
It is not obvious to me either - but Waldek may have unearthed the rationale for it in his earlier post. It is increasingly being used though - and by Borland's own developers. Many of the units that come with Delphi now use it (albeit mainly the newer ones).
[...]
If you want to have a single VCL and RAD tool, written in Pascal, and you don't want to reinvent it again and again for your C++ compiler, you have no option but to allow C++ to compile Pascal.
Yes, you have. Simply allow C++ to access Pascal routines (same as most Pascal compilers can call routines written in other languages). There's no need for the C++ compiler to compile the Pascal code.
There is a need if you do not want to restrict your C++ users to precompiled Pascal libraries. What if they want to change something in the VCL (or 3rd party) sources, to fix a bug, or for whatever other reason? This would be impossible if they couldn't then recompile the sources.
[...]
C++ has `//' comments and overloading (that doesn't necessarily mean they were invented there, I don't know that exactly), C/C++ have function calls with `()'. C/C++ has `void *' parameters which are like BP's untyped parameters, but I suppose variants are not quite the same. And C/C++ surely has something like `array of const', but with a more sane syntax -- sure, C's syntax for structured types is a little strange, but once you've understood the rules, it's quite logical in itself; I can't say that of `array of const' -- `array of' is normally followed by a type denoter in Pascal, but here they put the word `const' instead.
Yes, it is a bit silly. I guess the closest thing to it that I can think of is varargs in C. This is their way of supporting variable numbers (and types) of parameters. It is controversial whether that should ever be supported. But once you decide to support it, you are already extending the language - and I guess it's then up to you how you do it.
[...]
And apparently they're happily continuing this trend. I can't help but think that sooner or later that language will just collapse under its own weight.
I doubt it. Sometimes these extensions are simply a matter sharing features that already exist (and should exist) in a "sister" product. I would imagine that, if anything needs to go, it would be the excess baggage of backward compatibility
[...]
I sometimes hear the argument that good programmers don't use the whole mess of misfeatures, but only a "sane" subset of the language -- I hope that's true.
People who were already experienced Pascal/Delphi programmers just tend to stick to their own style of coding. New programmers (or newcomers to Delphi from other languages) tend to use all features indiscriminately. On the other hand, if you want to take advantage of variable numbers of arguments, you don't have much choice. The alternative is to write many different routines - and some people prefer this route.
If it is, maybe we should focus on supporting such a sane subset, and if nobody else does, we might even have to define that subset first. That might imply that we should not support features like `()' and other misfeatures (in contradiction to what I said yesterday) -- not because `()' would be difficult to implement, but because for all I know it has no real use and just adds unnecessary complexity.
Supporting a sane subset IMHO is no different from Borland's opiginal decision to implement only a subset (which I am sure they considered as "sane") of "Pascal". It would be half-baked, controversial, and not very useful for its intended purpose (facilitating the porting of Delphi code to GPC, or heling Delphi programmers in their transition to GPC). I think that GPC should either support all that it can when there is time to do it, or that Delphi support should just be dropped. In any case, things like qualified identifiers (to complete BP support) and "smart linking" seem to be greater priorities than patchy Delphi support.
One of the features of the original Pascal was a very clean syntax -- unfortunately the language was too limited for many purposes. Extended Pascal went a long way to remedy the latter while keeping the language mostly as clean and systematic. The (draft standard) object extensions (which actually seem close to Delphi's model) seem to follow in this spirit. But for many other extensions, I fail to see big advantages, but I often see substantial disadvantages (often in the syntax).
I am not sure that there is a consensus on that point (or that there can be). Delphi code seems very clear and eminently readable to me (and no doubt to many others). The extensions do not make the code any less clear or readable to me. Even if I don't see the point of them, people don't normally add pointless features to their software, even if others can't see what that point is. In the event, each developer has his own point of view, and very often, debates on points of view (read "preferences") are often inconclusive (which is why it often takes the producers of ANSI/ISO standards for ever to decide anything). Since you are maintaining the compiler, I guess you should just implement whatever you feel happy with. If others want more, then they can do it themselves!
As Marco said in another post, full Delphi support may well turn out to be a very hard nut to crack, and, given the philosophy behind GPC, perhaps we should leave that nut to the FPC people and concentrate on BP and the official "standards".
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/