[mythtv] C++ style

Simon Kenyon simon at koala.ie
Thu Feb 12 15:12:28 EST 2004


On Thursday 12 February 2004 02:36, Daniel Thor Kristjansson wrote:
> I just saw Ken Thompson yesterday, he invented the ++/-- on the PDP-7 in
> B. The PDP-7 did not have the PDP-11 auto-increment and auto-decrement
> address modes, the PDP-11 also did not exist yet. pcc may have
> implemented x++ as a post-increment, but there were many compilers that
> didn't do this. Only ++x was defined well until the 80's when ANSI
> standardization had to deal with the common assumption that x++ was a
> post-increment. I have used some of these annoying non-ansi compilers
> working with embedded systems, it ain't fun. If I hadn't lost my copy
> of the K&R 1st edition I'd look it up.
>
> Not that this matters, with ANSI C++ or C89 post-increment is only ill
> advised for classes where you might accidentally get an expensive class
> copy with a compiler such as gcc.

 let us not get into a contest here

seems that i've misplaced my K&R (1st edition) - or rather i think somebody
has pinched it as it was signed

i've been using i++ as posticrement since 1982
i lie - it might have been 1983

and honestly - ansi has nothing to do with anything
--
simon


More information about the mythtv-dev mailing list