News for hackers. Stuff that matters.
Re:Why Pascal is Not My Favorite Programming Language (1981) by nolok on Wednesday September 03, 2014 @02:59AM (#8261815)
Can you provide an example of how C is supposedly "closer to the metal" than pascal ? Both are native compiled language, and at least windows used to have its api coded in pascal rather than c before that language became dominant.
Re:Why Pascal is Not My Favorite Programming Language (1981) by Narishma on Wednesday September 03, 2014 @05:13AM (#8262128)
The Win16 API was written in C, not Pascal. But because it didn't have functions with a variable number of arguments, they could use the Pascal calling convention instead of the C one. It was slightly faster and saved a few bytes at each call point, which was a big deal back when memory was measured in kilobytes.
Re:Why Pascal is Not My Favorite Programming Language (1981) by wirrbel on Wednesday September 03, 2014 @04:36PM (#8265314)
C does not semantically separate arrays from pointers, Pascal does this.

C uses indexes starting from 0, Pascal does not.

Pascal usually does not come with strong memory layout guarantees that one knows from C (packing of structs, unions, etc.)

Typecasting in Pascal is a matter of dialect.

There are probably more but I cannot remember them because I have not used Pascal in a very long while.

Re:Why Pascal is Not My Favorite Programming Language (1981) by pjmlp on Wednesday September 03, 2014 @04:43PM (#8265359)
None of those points are "closer to the metal".

Only ANSI/ISO C11 does provide strong memory guarantees. Back then there wasn't even a C standard.

Re:Why Pascal is Not My Favorite Programming Language (1981) by pjmorris on Wednesday September 03, 2014 @08:34AM (#8262641)
In C, a pointer can point to any old memory address, including core elements of the machine's BIOS and operating system. In Pascal, an array is an array, not necessarily tied to anything in the machine.

I think that's the great strength and great weakness of each language.

Re:Why Pascal is Not My Favorite Programming Language (1981) by pjmlp on Wednesday September 03, 2014 @08:54AM (#8262730)
> In C, a pointer can point to any old memory address, including core elements of the machine's BIOS and operating system

You mean

    var
       buffer : array [0..$3FFF] of byte absolute $B800:$0
?

An array, protected with bounds checking accessing any memory address, provided the OS protection allows it.

Don't want bounds checking? Make use of {$R-}

Re:Why Pascal is Not My Favorite Programming Language (1981) by kjs3 on Wednesday September 03, 2014 @01:53PM (#8264323)
To be fair, the rant (and most of the misconceptions) about Pascal are about Wirth defined Pascal, not the much later extended Pascals that introduced things like "byte absolute" types. But you're right in that no one has probably tried to suffer through strict Wirthian Pascal since the last CDC Cyber got shut down except on a bet.

(Turbo Pascal on CP/M-80 was my goto for a number of years)