[TUHS] What would early alternatives to C have been?

Stuff Received stuff at riddermarkfarm.ca
Mon Mar 10 10:55:20 AEST 2025


On 2025-03-09 19:39, Lawrence Stewart wrote:
> The C operator precedence table has 15 precedence levels, from “++" down 
> to “,"
> (see https://en.cppreference.com/w/c/language/operator_precedence 
> <https://en.cppreference.com/w/c/language/operator_precedence>)
> 
> This is nuts.  I don’t remember them and I wouldn’t trust an engineer 
> who claimed to.
> 
> Around 2005, when I was doing some chip verification, I found a hard to 
> notice operator precedence bug (in VHDL, but it is the same issue) that 
> would have cost us a half-million dollar mask spin.
> 
> If there is more than one operator, I use parens (I do write a[x] + 
> b[x], that one I know.)
> 
> Our K-12 system isn’t doing us any favors when they think PEMDAS is 
> “mathematics”.
> 
> -L
> 
> PS I’ve been a little angry about this since my 6th grader got marked 
> down for using “extra” parentheses in class.

Parentheses around expressions were required in our coding style.

S.


More information about the TUHS mailing list