Historical language survey

Fredrik Olsson peylow at gmail.com
Fri Jul 7 12:21:09 PDT 2006


Sean Kelly skrev:
> kris wrote:
<snip>
>> Eh? We're talking about the language according the Wirth here (as 
>> Walter notes vis-a-vis Wirth's book). Somebody here ought to note that 
>> Pascal was designed *solely* as an educational tool, for /teaching 
>> structured programming/ ... the syntax and design was never intended 
>> as a solution for general-purpose systems programming. It's silly to 
>> compare it to C
> 
> 
> Yup.  And for that I think it was well-designed.  The syntax is clear 
> and free of arcane symbology, and irritating enough to use for real work 
> that students are well inclined to move on when they learn a more 
> professional language ;-)  The pointer syntax in Pascal drives me 
> absolutely insane.
> 
Am I the only one in the world that thinks the pointer syntax in Pascal 
beats the C and D syntax every time?

I mean how hard can it be:
^foo  == a pointer type, pointing to a foo. foo* works, but * also mul.
foo^  == Whatever the pointer foo points to. *foo works, same argument.
@bar  == The pointer of bar. &bar works to, but why reuse & again?

Pascal pointer logic also reads so well from left to right. Lets say you 
want to access a struct member of a pointer in C:
foo->bar
or
(*foo).bar
Or in Pascal simply:
foo^.bar
No exceptions, no need to introduce a new operator, and no need to use 
supeflous paranteses.

Now original Pascal, or even ANSI Pascal is hideous, that I can agree 
with. But I also think that turning the blind eye on what has been done 
with Turbo Pascal and Delphi the last two decades is idiotic. Especially 
since they have been more or less the de facto standard Pascal. And thus 
what Pascal should be judged by.


// Fredrik



More information about the Digitalmars-d mailing list