Perfect is the enemy of good. The fact that it's intractable doesn't mean you shouldn't try to find a reasonable local optimum.
For instance, if I have five minutes to code a traveling salesman implementation, I'll probably do a greedy algorithm that just does the closest city next until I've visited all cities. If I have more time, I might check that paths don't cross, and if they do, swap the order of the cities in that closed loop. That sorta thing.
Is it perfect? Of course not. Is it better than throwing up my hands and saying the problem is intractable, therefore I should just return the list of cities in whatever order they were given to me? Absolutely.
In the case of bitwise operators, Boolean algebra teaches us that & behaves like \* and | behaves like +. Therefore & should have the precedence of \* and | should have the precedence of +. Is this perfect, or as good as RPN? No. Is it better than a world where 'if (x & 0xff == y & 0xff) [...]' almost certainly does the wrong thing? Absolutely.
If Ritchie had designed C to use postfix notation instead of prefix notation for expressions, it simply wouldn't have caught on. It would be as dead as FORTH. If he had designed it to have better precedence rules for bitwise operations, the world would be a better place.
See also null terminated strings vs length prefixed strings. Length prefixed strings are not perfect. They are merely a lot better.
For instance, if I have five minutes to code a traveling salesman implementation, I'll probably do a greedy algorithm that just does the closest city next until I've visited all cities. If I have more time, I might check that paths don't cross, and if they do, swap the order of the cities in that closed loop. That sorta thing.
Is it perfect? Of course not. Is it better than throwing up my hands and saying the problem is intractable, therefore I should just return the list of cities in whatever order they were given to me? Absolutely.
In the case of bitwise operators, Boolean algebra teaches us that & behaves like \* and | behaves like +. Therefore & should have the precedence of \* and | should have the precedence of +. Is this perfect, or as good as RPN? No. Is it better than a world where 'if (x & 0xff == y & 0xff) [...]' almost certainly does the wrong thing? Absolutely.
If Ritchie had designed C to use postfix notation instead of prefix notation for expressions, it simply wouldn't have caught on. It would be as dead as FORTH. If he had designed it to have better precedence rules for bitwise operations, the world would be a better place.
See also null terminated strings vs length prefixed strings. Length prefixed strings are not perfect. They are merely a lot better.