I
ImpalerCore
[... discussing 'a = b == c;' vs 'a = (b == c);' ...]Put simply, if the expected statement is [a = b == c;] and the two
typo statements are [a = b = c;] or [a = (b = c);], I would detect the
second typo with less effort. [snip elaboration]
So is it fair to say you also are just expressing a personal
opinion?Sure it's my personal opinion, but the style of using of parentheses
to emphasize precedence is pretty common in the teaching and books used
when I was learning C and C++.
Remember Dijkstra's admonition: don't think something is _convenient_
just because it is _conventional_. Advising students to use extra
parentheses has been around at least since the 1960's when I first
learned how to program. Offered in beginning classes, it's the
programming equivalent of training wheels on a bicycle -- useful to
get people started, but no real help once the necessary skills have
been acquired. I no longer use training wheels on my bicycle, and I
don't think it's important in my everyday riding to cater to beginners
who still need them.
Use of spaces, not so much. In fact I
think you're the first person I've met that advocates using space over
parentheses to emphasize precedence in the manner you're describing.
People used to think the Earth was the center of the universe and
everything else revolved around it. Are you charging me with being
a heretic? Just because you're hearing an idea for the first time
doesn't mean the idea is bad; it's much more convenient to think of
the Earth as going around the Sun than vice versa, as repulsive as
that idea was to people when it was first proposed.
It would be nice if you tried to engage in an actual discussion
of the merits and shortcomings of a proposed alternative, rather
than just making an ad hominem remark and dismissing it.
No seriously, I didn't intend anything as an ad hominem. I have
simply not encountered it. I have not seen fellow posters rush to
defend your style as common. Sorry if it insulted you.
I think I'll just let the topic go from here on.
Best regards,
John D.