Walter Bright wrote: > On 12/21/2012 11:23 PM, Jonathan M Davis wrote: >> But we _want_ that. The fact that inaccessible functions are even >> considered >> in overload sets is horrible. That's precisely the problem. No >> inaccessible >> functions should be in overload sets. Otherwise, simply adding a private >> function to a module can break code elsewhere. I don't see _any_ >> benefit in >> having inaccessible functions be in overload sets. It's leaking >> implementation >> details outside of the scope that they're in and breaking code >> elsewhere when >> changes are made. What do you think is so desirable about having >> inaccessible >> functions in overload sets? > > > It's that way in C++ mainly so that it doesn't make the already complex > overloading system even more so. And in 25 years of working with C++, > I've never seen this make anyone's list of horrible things about C++. > Actually, it is *not* that way in C++ for "module-private" functions. I know that C++ doesn't have true "modules" and a fortiori true "module-private" functions (or types or variables), but the C++ equivalent of module-private is file static (or the anonymous namespace) and those do *not* make it into the overload set and cannot affect user code.
Jerome -- mailto:jeber...@free.fr http://jeberger.free.fr Jabber: jeber...@jabber.fr
signature.asc
Description: OpenPGP digital signature