▲ | motorest 21 hours ago | ||||||||||||||||
I'm definitely missing some key insight because after reading the article I felt it was a strawman argument. Python already has conditional expressions, which already allow 'x if (predicate) else y'. Therefore in Python if is already equivalent to a function, and is composable. Once you realize this, and also understand that Python has logical operators that can short-circuit, all Python examples feel convoluted and required the blogger to go way out of it's way to write nonidiomatic Python. If the goal was to make a point with Python, why not write Python? | |||||||||||||||||
▲ | middayc 21 hours ago | parent [-] | ||||||||||||||||
Python was used as an example because people know Python and reader can compare it to something known. I wasn't trying to make Python look awkward. I was trying to write equivalent Python, you are very much welcome to suggest improvements to my Python examples. Other languages could be used instead of Python, for example Javascript. But I feel Python is more contained language, with clear ways to do thing (I guess I don't know them that well :) ) | |||||||||||||||||
|