30 May
2002
30 May
'02
9:25 a.m.
david wrote:
What's the alternative proposed for C++?
Free functions at namespace scope. The analogy would be module-level functions in Python. C++ also has multiple string types, but the availability of overloading makes this approach practical
it works pretty well in Python too, of course: the string module delegates to object methods for all functions; e.g. "string.join()" uses the "join" implementation method to do the actual work, just like "len()" uses "__len__" (etc). </F>