Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, I don't think I claimed that these things weren't "envisioned" in 1979. My claim was that they most certainly weren't "common practice" in 1979.

In my mind, they didn't exist yet, and certainly the 1978 definition of C that I read and you also cite confirms this: "they cannot be passed to or returned from functions". Not much time between 1978 and 1979, so while that's possible it doesn't seem particularly likely.

My first C compiler, Manx Aztec C for the Amiga (obviously from the mid 1980s) didn't support structures as function arguments, and only got them with a later upgrade that supported ANSI C.

The 2nd edition of "The C Programming Language" from 1988 also describes ANSI C (at least that's what it says on the cover), so I don't see any documentation that points to C with structures as function arguments in the 1979 timeframe.

So I think even my less important claim, that structure passing came about with ANSI C, is pretty solid, even if there may have been isolated compilers that supported structure passing before that.

And never mind the "common practice".



I agree with your dispute with the OP's claim, but your claim that "The treatment of structs as full values that could be assigned and passed to or returned from functions was only introduced in ANSI C, 1989" is simply wrong, not at all "on solid ground" -- it came nearly a decade earlier ... but not soon enough to validate the OP's claim that you correctly disputed.

I won't comment further.


Before ANSI C in 1989, the C language was defined by K&R (1978), which is why that is usually called K&R C.

After the introduction of ANSI C, the C language was defined by the ANSI standard.

Can we agree on that?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: