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 :) )
> Python was used as an example because people know Python and reader can compare it to something known.
I don't think you understood the point I made.
My point is that Python supports conditional expressions for years.
Support for conditional expressions already means that in Python indeed "if is just a function".
Therefore, the whole premise of the article is null and void, and the article is thus pointless.
This is evident to anyone who is familiar with Python. If you have any experience with Python and you are familiar with idiomatic Python and basic features such as list comprehension, you are already widely aware how "if is just a function".
> I wasn't trying to make Python look awkward. I was trying to write equivalent Python (...)
Except you didn't. You failed to even acknowledge that Python already supports "if is just a function" with basic aspects such as list comprehension.
This basic aspect of Python is covered quite prominently in intros to Python, but somehow you failed to even acknowledge it exists, and proceeded to base your argument on a patently false claim.
> If `if` is a function why don't you call it like other functions in Python?
The whole point is that yes, you can call it like a function, because Python supports it as an expression.
I seriously recommend you take the time to go through a Python tutoria.
> Also, blog-posts is not just about `if`, is `for` a function in Python, `def`, `return`, `class`?
Python supports list comprehension, so yes it is also about `for`.
Once you discover that Python supports conditional expressions and list comprehension, do you honestly believe the blog post has any merit? The blog post even shows a failure to do basic homework to verify what Python actually supports and not supports.
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 :) )