[net.lang.c] side effects in PL/I versus C

gnu@sun.uucp (John Gilmore) (07/17/85)

Bill Crews of Cyb Systems said:
> My most heavily-used language before learning C was PL/I, which looks
> much like C *structurally*, BUT without the side effects such as imbedded
> assignments that C has.

I'm not sure what "side effects" C has that PL/I doesn't have.  It's
certainly true that you can call a function from anywhere in an
expression, and the function can have arbitrary side effects.  As
I recall, PL/I was one of the first languages IBM tried to design for
optimization, and there were very tight reins on what you could assume
about order of evaluation of expressions.  C is probably a bit looser,
but it's been long enough that I can't recall the difference without a
manual.

C does have a few builtin functions that produce side effects, but
PL/I had pass-by-reference, which means any user-written function
can do that to its arguments.