Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

15
  • 1
    In practice, quite difficult to use. Things like being careful to never let arithmetic promote precision beyond what fit in a register. I recall writing a lot of fixed bin(17) declarations to avoid expensive, extraneous code. Telling learners "never, ever, use / to divide fixed point, always use divide". All kinds of gotchas. C was such a breath of fresh air after that: just give me data types that behave simply, efficiently, and predictably.
    – John Doty
    Commented Jun 18, 2021 at 12:55
  • 1
    C was absolutely not bad at portability compared to PL/I. When UNIX first came out, it was rapidly ported to a variety of architectures with little difficulty (compare to Multics). But I never saw a PL/I program that was practical to run on both GE/Honeywell and IBM hardware. You had to tune your code to the specific machine in PL/I, but C doesn't need that except in relatively rare corner cases.
    – John Doty
    Commented Jun 18, 2021 at 13:06
  • 2
    Then why did all the practically portable C programs out of Bell Labs and Berkeley dominate the space that PL/I was targeted for?
    – John Doty
    Commented Jun 18, 2021 at 13:40
  • 2
    I would argue that C's type system is much clearer than PL/I's. Quick, without consulting a manual, if I give you FIXED BIN X;, what is the type of X/3?
    – John Doty
    Commented Jun 18, 2021 at 13:42
  • 2
    "The result is a machine independent definition that allows portage of programs between vastly different architectures without the need to rewrite anything" Cue hollow laughter from anyone who actually tried to do that for non-trivial application code. It simply didn't work. We tried, more that once, with several different target machines and compilers. The success rate was exactly zero (in binary or decimal).
    – alephzero
    Commented Jun 18, 2021 at 15:35