[m-dev.] Namespaces
Peter Ross
pro at missioncriticalit.com
Thu Mar 23 10:08:06 AEDT 2006
One thing that I think would improve the language would be that every type and
typeclass should introduce its own namespace.
This would allow field accessor functions and typeclass methods to have the
same name.
I know one can do this already by introducing nested sub-modules, however the
sheer number of import_modules needed makes writing the code to use the module
infeasible. Imagine a module with hundreds of types.
My first idea to do this would be to introduce a new type of sub-module which
is automatically imported when it's parent is imported and whose parent
automatically imports it.
This would then allow a simple source-to-source transformation to implement
these ideas.
Any thoughts?
Pete
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list