www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dscript (not DMDscript)

I have written a simple bash script which allows me to write D programs 
as scripts.  Basically, it just greps through the script, finding 
'import' statments and 'extern' declarations.  Then it echos out the 
start of a main() function, dumps the rest of the script, and then 
closes the main function.  It compiles the file and runs it.

Obviously, it's a little slow, but it isn't too bad for a first pass. :)

BTW, I included 'dscript_in_dscript', which is my proof that the 
language is workable.  This is a script which does the same as dscript, 
but it is written in dscript instead of bash.  You'll see that there are 
some things which are easy to do in dscript, and other things which are 
better done in bash.
Mar 02 2005