Re: coding practices: include whole module or only the needed function

2014-10-07 Thread ketmar via Digitalmars-d-learn
On Tue, 07 Oct 2014 19:38:52 + monarch_dodra via Digitalmars-d-learn wrote: > On Tuesday, 7 October 2014 at 17:29:45 UTC, ketmar via > Digitalmars-d-learn wrote: > > On Tue, 07 Oct 2014 17:24:40 + > > bachmeier via Digitalmars-d-learn > > > > wrote: > > > >> On Tuesday, 7 October 2014

Re: coding practices: include whole module or only the needed function

2014-10-07 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 7 October 2014 at 17:29:45 UTC, ketmar via Digitalmars-d-learn wrote: On Tue, 07 Oct 2014 17:24:40 + bachmeier via Digitalmars-d-learn wrote: On Tuesday, 7 October 2014 at 08:37:59 UTC, monarch_dodra wrote: > As a general rule, avoid imports in global scope anyways. Can you

Re: coding practices: include whole module or only the needed function

2014-10-07 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 7 October 2014 at 08:37:59 UTC, monarch_dodra wrote: As a general rule, avoid imports in global scope anyways. Can you expand or provide a link to the issue?

Re: coding practices: include whole module or only the needed function

2014-10-07 Thread ketmar via Digitalmars-d-learn
On Tue, 07 Oct 2014 17:24:40 + bachmeier via Digitalmars-d-learn wrote: > On Tuesday, 7 October 2014 at 08:37:59 UTC, monarch_dodra wrote: > > As a general rule, avoid imports in global scope anyways. > Can you expand or provide a link to the issue? ahem... https://issues.dlang.org/show_bug.c

Re: coding practices: include whole module or only the needed function

2014-10-07 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 7 October 2014 at 07:33:24 UTC, Gary Willoughby wrote: On Monday, 6 October 2014 at 21:24:56 UTC, AsmMan wrote: Which practice do you use: if you need only one or two functions from a module: import myModule : func, func2; or (import whole module, assuming no function name conflit

Re: coding practices: include whole module or only the needed function

2014-10-07 Thread Gary Willoughby via Digitalmars-d-learn
On Monday, 6 October 2014 at 21:24:56 UTC, AsmMan wrote: Which practice do you use: if you need only one or two functions from a module: import myModule : func, func2; or (import whole module, assuming no function name conflits of course) import myModule; any words why one over the other a

Re: coding practices: include whole module or only the needed function

2014-10-06 Thread ketmar via Digitalmars-d-learn
On Mon, 06 Oct 2014 21:24:54 + AsmMan via Digitalmars-d-learn wrote: > Which practice do you use: if you need only one or two functions > from a module: > > import myModule : func, func2; > > or (import whole module, assuming no function name conflits of > course) > > import myModule; >

Re: coding practices: include whole module or only the needed function

2014-10-06 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Oct 06, 2014 at 09:24:54PM +, AsmMan via Digitalmars-d-learn wrote: > Which practice do you use: if you need only one or two functions from > a module: > > import myModule : func, func2; > > or (import whole module, assuming no function name conflits of course) > > import myModule; >

Re: coding practices: include whole module or only the needed function

2014-10-06 Thread bearophile via Digitalmars-d-learn
AsmMan: import myModule : func, func2; I use this in D to know what I have imported and where is was imported from. Bye, bearophile

coding practices: include whole module or only the needed function

2014-10-06 Thread AsmMan via Digitalmars-d-learn
Which practice do you use: if you need only one or two functions from a module: import myModule : func, func2; or (import whole module, assuming no function name conflits of course) import myModule; any words why one over the other are welcome. I like the first one why it explicitly show w