The DUB package manager

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Sun Feb 17 03:47:20 PST 2013


On Sun, 17 Feb 2013 09:24:08 +0000
Russel Winder <russel at winder.org.uk> wrote:
> 
> Using JSON (YAML, whatever) is a recipe for failure. The syntax is
> data exchange facing, whereas writing and maintaining a build script
> (even if it is only 4 lines long), is a human activity. Do not
> underestimate the reaction "why do I have to write this data exchange
> format?" The rapid demise of XML, Ant, Maven, etc. is testament to
> people awakening to the fact that they were forced to use manually a
> language designed for another purpose.
> 
[...]
> 
> If all the energy around DUB and Orbit leads to the situation where D
> cannot be used to create an internal DSL for describing build and
> package/artefact management, then D has failed.
> 

I half-agree with you. Where I disagree is with the idea that it's an
issue of "embedded DSL (good) vs data language (bad)". I think the
real issue is just simply having good clean syntax for what you need
to accomplish.

Note that your examples of "rapid demise" (XML, Ant, Maven) are all
XML, which is notoriously over-verbose. JSON has much the same problem,
just to a lesser degree: It's a subset of human-intended JavaScript,
yes, but it just happens to be an unfortunately verbose subset
(although not to the extreme degree as XML).

Then on the flipside, we have the example of INI files: Definitely a
purely data-language, definitely not an embedded DSL, and yet that's
never been a hindrance for it: it's been a lasting success for many
things. And the only time anyone complains about it is when more power
is needed. (And no, I'm not suggesting DUB or Orbit use INI files.
Again, specifically because more power is needed here.)

So I agree JSON/YAML carries an unfortunate risk of turning people off -
but because of excess syntax, not because it's a data language or
because it's not embedded in D.

I think SDL (Simple Declarative Language) hits the sweet spot:
http://sdl.ikayzo.org/display/SDL/Language+Guide

FWIW, I just resumed working on a D parser for SDL. EVen if SDL
doesn't get used for DUB or Orbit or dmd.conf, I think it'll still be a
great thing to have available. It's such a simple grammar, I don't
think it'll take long to reach a usable point.



More information about the Digitalmars-d mailing list