> In python, you don't need overloading, you have a variety of > optional parameter mechanisms ...which forces users to write centralized dispatching mechanism that could be much more elegantly-handled by the language. The language already does something just for operators, but the rules are complicated and don't scale well. > I think the "member functions" issues from C++ don't apply to > Python becuase C++ is strongly typed, meaning that many similar > functions have to be written with slightly different type > signatures. That's very seldom the case in my C++ code. Why would you do that in lieu of writing function templates? I think Martin hit the nail on the head: you can achieve some decoupling of algorithms from data structures using free functions, but you need some way to look up the appropriate free function for a given data structure. FOr that, you need some kind of overload resolution. > The lack of strong typing makes it practical to > write generic operations. Templates and overloading in C++ make it practical to write statically-type-checked generic operations.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4