Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!sun!gnu
From: gnu@sun.uucp (John Gilmore)
Newsgroups: net.lang.c
Subject: Re: side effects in PL/I versus C
Message-ID: <2428@sun.uucp>
Date: Wed, 17-Jul-85 02:07:47 EDT
Article-I.D.: sun.2428
Posted: Wed Jul 17 02:07:47 1985
Date-Received: Thu, 18-Jul-85 07:47:31 EDT
References: <474@crystal.UUCP> <397@umcp-cs.UUCP> <721@wlcrjs.UUCP> <5755@utzoo.UUCP> <587@cyb-eng.UUCP>
Organization: Sun Microsystems, Inc.
Lines: 17

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.