[fpc-pascal] even linus torvalds prefer pascal over c

Florian Klaempfl florian at freepascal.org
Sat Dec 2 16:48:12 CET 2006


John Coppens schrieb:
> On Sat, 02 Dec 2006 08:01:04 -0500
> David Mears <david.mears at suddenlink.net> wrote:
> 
>>  From the first pascal program that I wrote in the late 80s to today, 
>> I've only used Goto once and that was because I was still learning the 
>> language - it was essentially a repeat loop and I replaced it in later 
>> versions.
> 
> Same here...
> 
> But, I wonder. With modern optimizing compilers doing almost what they
> want with the original source code, I'm quite sure some semantic
> optimiser will replace parts of codes by goto's anyway. So why would it
> ever be necessary to worry about optimising the source code with
> 'spaghetti' code, as we are shifting the responsability for optimising
> execution to the compiler writers anyway?
> 
> If fact, if the optimiser is good, spaghetti (goto-)programs and 'nice'
> code should generate the same executable anyway, shouldn't they? So,
> doesn't it make sense to try and make the source as readable as possible?

gotos make life for optimizing steps based on data flow information very 
hard, so using while, repeat etc. makes also life for an optimizer easier.




More information about the fpc-pascal mailing list