Re: import and call

2019-06-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 2 June 2019 at 19:38:11 UTC, Amex wrote: I thought importing single functions were suppose to be faster. Am I wrong? That is wrong. Importing is always done of the whole module. All the `: func` thing does is limit the things introduced to the namespace.

Re: import and call

2019-06-02 Thread Basile B. via Digitalmars-d-learn
On Sunday, 2 June 2019 at 19:38:11 UTC, Amex wrote: Tired of having to import a single function to call it. Since mod.foo(x); doesn't work since mod is not defined. we have to do import mod : foo; foo(x); Why not mod:foo(x)? or mod#foo(x) or mod@foo(x) or whatever Reduces 50% of

import and call

2019-06-02 Thread Amex via Digitalmars-d-learn
Tired of having to import a single function to call it. Since mod.foo(x); doesn't work since mod is not defined. we have to do import mod : foo; foo(x); Why not mod:foo(x)? or mod#foo(x) or mod@foo(x) or whatever Reduces 50% of the lines and reduces the import symbol. I realize