Splitting stdio, etc.

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 12 07:32:32 PST 2014


On Wed, Nov 12, 2014 at 06:59:03AM -0800, Andrei Alexandrescu via Digitalmars-d wrote:
> On 11/12/14 6:51 AM, Shammah Chancellor wrote:
> >Will a PR for splitting stdio up into a package require a DIP?  It
> >should not be a breaking change -- correct?  Some of the standard
> >module files are very substantial at this point and require quite a
> >bit of work to compile a simple "Hello World" application.
> 
> $ wc -l std/stdio.d
>     4130 std/stdio.d
> 
> Looks reasonably sized to me.
> 
> $ wc -l std/**/*.d | sort -nr | head
> 
>   212342 total
>    33275 std/datetime.d
>    14589 std/algorithm.d
>    10703 std/range.d
>     9010 std/uni.d
>     6540 std/math.d
>     6452 std/traits.d
>     6254 std/format.d
>     5235 std/typecons.d
>     5183 std/conv.d
> 
> Better choose from these. Jonathan has long planned to break
> std.datetime into smaller parts, but he's as busy as the next guy so
> feel free to take up on that.
[...]

Ilya has been working on localizing imports, which will help in
splitting up these modules.

I've tried splitting up std.algorithm before but it was way too huge to
be doable in a short amount of time (I didn't have enough free time to
go through the entire module, and there were many problems with
interdependencies, import dependencies, etc.). I'm thinking perhaps it
should be done piecemeal -- start introducing one or two submodules
under std.algorithm and rename the current algorithm.d to package.d,
then gradually migrate functions over to the submodules, keeping them as
public imports in package.d.


T

-- 
"A one-question geek test. If you get the joke, you're a geek: Seen on a California license plate on a VW Beetle: 'FEATURE'..." -- Joshua D. Wachs - Natural Intelligence, Inc.


More information about the Digitalmars-d mailing list