lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Wed, Sep 24, 2008 at 1:31 PM, Stephen Kellett
<> wrote:
>> "loadIdentity()" and so on. How would you solve this problem in an elegant
>> approach in a static language?
> C++, C# and Java all do it using namespaces (or packages).

That covers part of the issue (avoiding name collisions).  Another
part is covered by concept_map in C++0x, which allows syntax
adaptation so that calls to MatrixConcept::identity() for a type X
that models MatrixConcept can actually be dispatched to loadIdentity()
or whatever is needed without needing wrapper classes.

-- James