On 11/11/10 5:50 AM, Alexander Malakhov wrote:


Perhaps a module std.scripting could help quite a lot, too.



module std.script;

public import std.stdio, std.file, std.process, std.algorithm, ... etc

I use at least some of these for most of my programs/scripts. And
std.all is probably a bit too heavy.

std.script could basically fetch us enough stuff to be on par with
importless python.

Maybe it would be better to just make rdmd to surround source code with:

//----- rdmd generated text BEGIN
public import std.stdio, ...

void main( string[] args ){
//----- rdmd generated text END

// programmer's code
}

in cases when rdmd detects there is no main()

rdmd already does that with --eval and --loop.

http://www.digitalmars.com/d/2.0/rdmd.html

Andrei

Reply via email to