Import concerns revisited
xs0
xs0 at xs0.com
Mon Jul 10 15:18:23 PDT 2006
Tom S wrote:
> Another downside is that, the selective import using the 'with'
> construct only imports these symbols into the current scope, while
> 'static import' allows you to access all symbols from the imported
> module if you use a fully qualified name. This is as evil as the
> "'private', yet not private" symbols in modules.
While I support improving import (particularly allowing import of single
symbols), I think you're exaggerating here. There is actually nothing
wrong if all FQNs from a module are accessible (if private worked,
anyway ;), as most all of the problems arise only with unqualified
names.. In fact, some languages (e.g. Java) allow access via FQN without
even specifically importing anything, and I never heard referred to that
feature as evil before :)
That private symbols are visible is pure evil, though :) They should
behave as if they don't exist to outside their module, that being the
whole point of tagging something as private.
xs0
More information about the Digitalmars-d
mailing list