On 2011-10-26 20:57, Eric Poggel (JoeCoder) wrote:
On 10/26/2011 2:55 PM, Eric Poggel (JoeCoder) wrote:
On 10/26/2011 2:51 PM, Eric Poggel (JoeCoder) wrote:
On 10/26/2011 2:30 PM, Jacob Carlborg wrote:
I think the best approach would be to have a complete language for the
build scripts.

This is the approach I've taken with dsource.org/projects/cdc. That
language is D. It provides a library of common compilation tasks and
then you fill in the main() with what you want it to do. Then you can
simply invoke dmd -run buildscript.d to create your project.

At one point it worked with d1 and d2 with ldc, gdc, and dmd, phobos or
tango. But it's been a year or so since I've tested.

It can also be used as a pass-through tool to dmd, gdc, or ldc, except
it accepts source paths as well as source files (adding all files in the
path to the build). But rdmd may already do this better, since cdc
currently lacks any concept of an incremental build.


But my point here isn't so much to promote CDC, bur rather to insist
that we should use D instead of a custom language invented for the task.
Reasons:

1. D will always be more powerful. And you will have all of phobos at
your disposal. You can parse xml, ftp files, etc.
2. Anyone writing this script will already know D. They won't have to
learn another language.
3. We'll truly be eating our own dog food. Although I wouldn't call it
dog food.

4. It will be easier to implement. A library of functions instead of a
complete parser/interpreter. CDC is boost licensed if anyone wants to
borrow from it.

I'm using Ruby for my package manger Orbit, it's working very well. It allows, in my opinion, a cleaner and better looking DSL than D.

--
/Jacob Carlborg

Reply via email to