Re:Why the data center needs an operating system
by aidenn0 on Wednesday December 03, 2014 @09:15PM
(#8697545)
Actually C disallows converting function pointers to/from void pointers.
Re:Why the data center needs an operating system
by davidgerard on Thursday December 04, 2014 @03:24AM
(#8698363)
Can you get away with that in pre-ANSI C? I wouldn't be surprised.
Re:Why the data center needs an operating system
by aidenn0 on Thursday December 04, 2014 @11:34AM
(#8700053)
for pre-ANSI C most of these questions are answered by "it depends on the compiler" which is why ANSI C happened. Of course the answer is still "it depends on the compiler" for this behavior, since it's not defined what it does in ANSI C, just that it's not portable to do it.
Re:Why the data center needs an operating system
by davidgerard on Thursday December 04, 2014 @12:19PM
(#8700330)
I remember working on a Fujitsu box in 1993, which used some sort of weird System V Unix with pre-ANSI C and weirdly abbreviated man pages in Engrish. (shudder) Yeah.
Re:Why the data center needs an operating system
by davidgerard on Thursday December 04, 2014 @03:23AM
(#8698362)
Against the PDP-11, which the VAX directly descended from, but yes. Unix and C were written for the PDP series.
- Pointer types are basically fungible in C (otherwise there would be no void-ptr type)
- There's no compile-time knowledge of the segment a pointer references to prevent you from dereferencing a pointer to an offset from segment A when segment B is loaded (compare this to Rust's parameterization of Box types by their allocator)
- Struct padding is painful and tacked on
- "unsigned char" isn't default even though it'd make much more sense for it to be (What "char"acter is negative? You can have a signed byte/octet, but a character is—in 1979, at least—basically an enum/sum type.