www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Experimenting with std.all

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
We're discussing adding the all-inclusive module std.all to Phobos. That 
should simplify scripting. My experiments indicate that the cost of 
parsing all of std.all is small in an empty program, but I haven't 
tested things with actual programs.

If anyone would like to test things and come back with results and 
impressions, I paste the content of std.all at the end of this. Just 
paste the code into a module of yours and then include that module in 
your regular code.

For some reason, std.bigint has some issues so I commented it out. It's 
also possible that you don't have std.container installed, so I 
commented that out too.


Thanks,

Andrei


  public import std.algorithm;
  public import std.array;
  public import std.base64;
  // public import std.bigint;
  public import std.bitmanip;
  public import std.boxer;
  public import std.compiler;
  public import std.complex;
  public import std.concurrency;
  //public import std.container;
  public import std.contracts;
  public import std.conv;
  public import std.cpuid;
  public import std.cstream;
  public import std.ctype;
  public import std.date;
  public import std.datebase;
  public import std.dateparse;
  public import std.demangle;
  public import std.encoding;
  public import std.file;
  public import std.format;
  public import std.functional;
  public import std.getopt;
  public import std.gregorian;
  public import std.intrinsic;
  public import std.json;
  public import std.loader;
  public import std.math;
  public import std.md5;
  public import std.metastrings;
  public import std.mmfile;
  public import std.numeric;
  public import std.outbuffer;
  public import std.path;
  public import std.perf;
  public import std.process;
  public import std.random;
  public import std.range;
  public import std.red_black_tree;
  public import std.regex;
  public import std.regexp;
  public import std.signals;
  public import std.socket;
  public import std.socketstream;
  public import std.stdint;
  public import std.stdio;
  public import std.stdiobase;
  public import std.stream;
  public import std.string;
  public import std.syserror;
  public import std.system;
  public import std.traits;
  public import std.typecons;
  public import std.typetuple;
  public import std.uni;
  public import std.uri;
  public import std.utf;
  public import std.variant;
  public import std.xml;
  public import std.zip;
  public import std.zlib;
Jun 08 2010
next sibling parent "Nick Sabalausky" <a a.a> writes:
"Andrei Alexandrescu" <SeeWebsiteForEmail erdani.org> wrote in message 
news:hum2v9$2cqs$1 digitalmars.com...
 We're discussing adding the all-inclusive module std.all to Phobos. That 
 should simplify scripting. My experiments indicate that the cost of 
 parsing all of std.all is small in an empty program, but I haven't tested 
 things with actual programs.

I think that's a great idea. I had a similar feeling about Tango a while back and added the following module to my SemiTwist D Tools library (although this doesn't try to include all of Tango, just things that would be most useful for scripting): http://www.dsource.org/projects/semitwist/browser/trunk/src/semitwist/cmd/all.d
Jun 08 2010
prev sibling next sibling parent "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Tue, 08 Jun 2010 14:42:51 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail erdani.org> wrote:

 We're discussing adding the all-inclusive module std.all to Phobos. That  
 should simplify scripting. My experiments indicate that the cost of  
 parsing all of std.all is small in an empty program, but I haven't  
 tested things with actual programs.

 If anyone would like to test things and come back with results and  
 impressions, I paste the content of std.all at the end of this. Just  
 paste the code into a module of yours and then include that module in  
 your regular code.

 For some reason, std.bigint has some issues so I commented it out. It's  
 also possible that you don't have std.container installed, so I  
 commented that out too.

I had to comment out the following imports in order to test with 2.046: public import std.red_black_tree; public import std.loader; public import std.gregorian; public import std.concurrency; -Steve
Jun 08 2010
prev sibling parent sybrandy <sybrandy gmail.com> writes:
On 06/08/2010 02:42 PM, Andrei Alexandrescu wrote:
 We're discussing adding the all-inclusive module std.all to Phobos. That
 should simplify scripting. My experiments indicate that the cost of
 parsing all of std.all is small in an empty program, but I haven't
 tested things with actual programs.

 If anyone would like to test things and come back with results and
 impressions, I paste the content of std.all at the end of this. Just
 paste the code into a module of yours and then include that module in
 your regular code.

 For some reason, std.bigint has some issues so I commented it out. It's
 also possible that you don't have std.container installed, so I
 commented that out too.


 Thanks,

 Andrei

As long as no unneeded code is imported as a result, that's cool. I like it a lot. I just know from a project I worked on that M$ has an import that looks innocuous, however it imported a large chunk of it's standard library in one shot. Needless to say, it made analyzing the software much more difficult and I believe it made the resulting files bigger as a result. I can't recall any more than that as it's been a few years. Casey
Jun 08 2010