[TUHS] What would early alternatives to C have been?
Larry McVoy
lm at mcvoy.com
Mon Mar 10 13:06:49 AEST 2025
On Sun, Mar 09, 2025 at 08:55:20PM -0400, Stuff Received wrote:
> 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.
Good for you, we were the same. It's not that hard to make the code
easier to read.
--lm
More information about the TUHS
mailing list