3 ms·
I would have once disagreed with you being a C programmer. However, nowadays there is a tendency to providing functional features, including for example if..els
by wbhart 14y ago
I would have once disagreed with you being a C programmer. However, nowadays there is a tendency to providing functional features, including for example if..else expressions. But if you make i++ an expression, you end up with ambiguities if i++ ends up being the last line of an if..else branch, and say s = "hello" being the last line of the other branch. In a statically compiled language, the compiler has no choice but to interpret both as expressions and complain about the types of the two if..else branch expressions not matching. However, the programmer may have intended these expressions for their side effects only, not their values. Perfectly good code needs to be rewritten to work around the type checker. How fiddly.