"Steven Schveighoffer" <[email protected]> wrote in message news:[email protected]... > > For builtin types (such as arrays or numbers), there wouldn't be a module > that the type was defined. However, object.di is imported by everything, > so extensions could be put in there. >
Wait, What? Weren't you strongly *opposed* to this last week when I suggested it for empty()? I'm not trying to be an ass about it. Just not sure if you changed your mind, or I'm missing something, or what. > One misleading suggestion from the article however, it's not very easy to > create non-friend non-member functions using UFCS, considering that every > function in a given module is a friend. In order to do this, you would > need a helper module for each module that wants to define such non-friend > functions. Given the above proof, the helper module would also have to be > imported by the main module. > Yea, that occurred to me, too. <wishful musing>I've been starting to think more and more that the "everything in a module is a friend" was a mistake, and that we should have instead just had a "module" access specifier like we have "package".</wishful musing>
