On Sat, Apr 25, 2020, 1:50 PM Kirill Balunov <kirillbalunov@gmail.com> wrote:
Python uses such an approach (separate functions) because there are real flaws in the mode switching approach? Or just historically?
Well, I think I'd say "philosophically." It's not an historical curiosity like some of the pass-through sys or os functions with signatures that are much more like C than Python. There are definitely pros and cons to different approaches, but striving for relative consistency within one language feels worthwhile. But Python chose to usually avoid mode switches in function signatures. I myself use Pandas, as I mentioned, and it's basically a DSL with a very different philosophy than Python. It encourages fluent style and has tons of mode switches. It's not wrong, but it's absolutely different. Or Python uses snake_case for functions (usually, not always). Which doesn't make CamelCase languages wrong, just different.