4 ms·
OP literally says this: In Python, an if conditional is a statement, and can only be used in certain positions. This is categorically wrong. In python the
by crimsonalucard 7y ago
OP literally says this:
In Python, an if conditional is a statement, and can only be used in certain positions.
This is categorically wrong. In python the if conditional exists in statement form and expression form. The if-expression also basically exists in every other imperative language out there, usually in this form:
x + (is_true() ? 1 : 2)
I know he's not trying to criticize python. Just want to correct his mistake and emphasize that python has intrinsic design features that can make it very very functional.
- earenndil 7y agoYep. Also most c-derived languages have 'progn' as the comma operator. Expression-...ism? is not really a problem.
- hencq 7y agoI think you just misinterpreted the point he's making. Yes, Python has an expression form for if, but it's a separate form. You can definitely write functional Python, but the point he makes is that Python differentiates between expressions and statements.
- crimsonalucard 7y agoNo I made no mistake. I get his point. Look at my reference. I literally posted the statement that is categorically wrong. He literally says that in python the if-conditional is a statement. This is False. I also offer some proof as to why python is a bad choice for his examples because python is actually a highly functional language. It's like trying to use haskell to prove racket is more expressive. It's a bad choice. Sometimes I don't understand people. I literally posted just factual errors, no opinions on his article and then people misinterpret everything I said as opinion and proceed to tell me I misinterpreted things, then vote me down. Seriously.