The D Scripting Language

Gary Whatmore no at spam.sp
Thu Nov 11 06:07:35 PST 2010


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()

No, it could do that in all cases. D supports nested declarations. This is how the other languages do this. It would improve the score a lot. Did TDPL talk script programming? We can still change this radically without breaking D2 - thank god the specification is informal and incomplete.


More information about the Digitalmars-d mailing list