Re:Pointers Are More Abstract Than You Might Expect in C
by hexane360 on Monday July 02, 2018 @01:08PM
(#17443442)
The obvious flipside of this is that those C programs written for Burroughs never had any chance of running on anything but Burroughs. The only difference is that C offloads the effort of portability onto the user, whereas other languages at least attempt to make it portable in the compiler.
[ Parent
| on HN ]
Re:Pointers Are More Abstract Than You Might Expect in C
by saagarjha on Monday July 02, 2018 @01:49PM
(#17443852)
Why not? As long as your program is standards-compliant, it should work on any computer with a working C compiler…
Re:Pointers Are More Abstract Than You Might Expect in C
by hexane360 on Monday July 02, 2018 @04:10PM
(#17444939)
- integral sizes aren't standard
- little vs big endian
- signed int layout
- float layout
- includes vary
- bit field implementations vary
- loads of undefined and implementation-defined behavior
Re:Pointers Are More Abstract Than You Might Expect in C
by saagarjha on Tuesday July 03, 2018 @04:07AM
(#17448361)
The only thing that can change is implementation-defined behavior, and this can be detected and guarded against. Undefined behavior cannot exist in a standards-compliant program.
Re:Pointers Are More Abstract Than You Might Expect in C
by pjmlp on Monday July 02, 2018 @01:47PM
(#17443838)
What?! Since when did Burroughs had a C compiler?
NEWP was and is more than enough, while being much safer.
Re:Pointers Are More Abstract Than You Might Expect in C
by bitwize on Monday July 02, 2018 @02:49PM
(#17444379)
Safety is a hardware feature of the Burroughs architecture. C is no less safe there than NEWP.
Re:Pointers Are More Abstract Than You Might Expect in C
by pjmlp on Monday July 02, 2018 @03:05PM
(#17444503)
Sure it is, NEWP only allows for C style unsafely on UNSAFE blocks, clearly tagged by the system administrator as allowed for execution.
So not only is lack of safety expressed on the type system, something that C doesn't have, it also allows someone explicitly stating it is ok to risk its execution.
Re:Pointers Are More Abstract Than You Might Expect in C
by bitwize on Monday July 02, 2018 @04:13PM
(#17444955)
You're assuming that C runs on the Burroughs the way it commonly does on x86, with arbitrary access to all memory within its address space. This is not specified in the C standard, and it's not the case for C on the Burroughs. In particular, since C was not the OS implementation language, but was mainly uaed to port programs from other architectures, the C heap lived entirely within a single memory block and C code could not interfere with other programs. See: https://en.wikipedia.org/wiki/Burroughs_large_systems_descri...