d - How do I prevent a function from being imported from my module? -


i'm looking private attribute working not class members, module entities. functions, classes, enumerators etc.

for instance, in erlang there export attribute, goes this: -export([fun1, fun2]), meaning fun1 , fun2 of functions in module exported. in d seems exported default, ok, there way prevent specific that?

in module being imported, can mark private keep being accessible other modules. private works same way on module level entities on class members - inaccessible outside module, usable inside module. however, still visible, can create silly errors "private function foo module conflicts function foo module b", forcing disambiguate name. (i, , several others, hoping changed @ point, since shouldn't problem!)

in module doing importing, can't "import except", can import list of specific names without importing others:

import std.stdio : file, writefln;  void main() { file f; // cool writefln("hello"); // cool writeln("hey"); // "error: 'writeln' not defined" - selective import didn't pull name @ } 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -