The D Scripting Language

Bruno Medeiros brunodomedeiros+spam at com.gmail
Fri Nov 26 08:55:42 PST 2010


On 11/11/2010 13:50, 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()

I think that if one wants to add to D tools additional semantics such as 
that one (automatically add main, imports, etc., for scripting), it 
would be nice to define a new file extension like ".ds", ".dscript", 
whatever, for such files, just to make this clearer and more separate.


-- 
Bruno Medeiros - Software Engineer


More information about the Digitalmars-d mailing list