Re: what are guidelines for when to split a module into a package?

2018-02-22 Thread H. S. Teoh via Digitalmars-d
On Thu, Feb 22, 2018 at 03:53:59PM +0100, Timon Gehr via Digitalmars-d wrote: > On 22.02.2018 08:13, Timothee Cour wrote: > > Advantages of splitting: > > ... > > * easier to edit (no need to scroll much to see entirety of module > > we're editing) > > I don't think this particular point is true.

Re: what are guidelines for when to split a module into a package?

2018-02-22 Thread Timon Gehr via Digitalmars-d
On 22.02.2018 08:13, Timothee Cour wrote: Advantages of splitting: ... * easier to edit (no need to scroll much to see entirety of module we're editing) I don't think this particular point is true. Splitting can actually make editing slightly harder. Scrolling is an inefficient way to find

Re: what are guidelines for when to split a module into a package?

2018-02-22 Thread Seb via Digitalmars-d
On Thursday, 22 February 2018 at 08:04:19 UTC, Timothee Cour wrote: it actually does reduce compilation times if the imports go directly to the module in question rather than to a module that publicly imports the symbols time1=compilation time of `import std.algorithm : find;` before split

Re: what are guidelines for when to split a module into a package?

2018-02-22 Thread Timothee Cour via Digitalmars-d
> that doesn't help anyone who's actually reading the documentation and trying > to find stuff that way how about the following fix for that: having a DDOC token on a package.d to indicate merging the submodules in the documentation, eg: ``` /// MERGE_SUBMODULES std/aglorithm/package.d ```

Re: what are guidelines for when to split a module into a package?

2018-02-22 Thread Timothee Cour via Digitalmars-d
> it actually does reduce compilation times if the imports go directly to the > module in question rather than to a module that publicly imports the symbols time1=compilation time of `import std.algorithm : find;` before split time21=compilation time of `import std.algorithm : find;` after split

Re: what are guidelines for when to split a module into a package?

2018-02-22 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, February 21, 2018 23:44:49 Timothee Cour via Digitalmars-d wrote: > > it's harder to find symbols > > i don't understand this argument. > > ``` > dscanner --declaration startsWith > ./std/algorithm/searching.d(4105:6) > ./std/algorithm/searching.d(4195:6) >

Re: what are guidelines for when to split a module into a package?

2018-02-22 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, February 21, 2018 23:48:32 Timothee Cour via Digitalmars-d wrote: > ``` > import std.algorithm.searching : find; > > not > > import std.algorithm : find; > ``` > > that's just a missed opportunity to benefit from the split; we're in > no way worse after the split than before the

Re: what are guidelines for when to split a module into a package?

2018-02-21 Thread Timothee Cour via Digitalmars-d
``` import std.algorithm.searching : find; not import std.algorithm : find; ``` that's just a missed opportunity to benefit from the split; we're in no way worse after the split than before the split in that regard. We can just leave it as `import std.algorithm : find;` with no adverse effect.

Re: what are guidelines for when to split a module into a package?

2018-02-21 Thread Timothee Cour via Digitalmars-d
> it's harder to find symbols i don't understand this argument. ``` dscanner --declaration startsWith ./std/algorithm/searching.d(4105:6) ./std/algorithm/searching.d(4195:6) ./std/algorithm/searching.d(4265:6) ./std/algorithm/searching.d(4301:6) ``` On Wed, Feb 21, 2018 at 11:31 PM, Jonathan

Re: what are guidelines for when to split a module into a package?

2018-02-21 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, February 21, 2018 23:13:33 Timothee Cour via Digitalmars-d wrote: > from my perspective it makes sense to split a module M into submodules > A, B when: > * M is large > * there's little interaction between A and B (eg only few symbols from > A are needed in B and vice versa) > * A

Re: what are guidelines for when to split a module into a package?

2018-02-21 Thread rikki cattermole via Digitalmars-d
On 22/02/2018 8:13 PM, Timothee Cour wrote: from my perspective it makes sense to split a module M into submodules A, B when: * M is large Soft 1k, 2-3k hard limit. At this point either your scope is good, or you need to subdivide it again.