I hate new DUB config format

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Thu Nov 26 14:47:01 PST 2015


On 11/26/2015 11:05 AM, Sönke Ludwig wrote:
> But still
> this thread has overall been very irritating to me (that doesn't quite describe
> it). Maybe I should better have replied immediately and anticipate some of the
> statements that followed, but I have discussed this topic countless times and
> I'm getting seriously tired of it (because it is the _prototype of a
> bikeshedding topic_). Combine that with a hardly motivated and inflammatory
> initial post, I was hoping that this would just quickly die off - obviously a
> very naive thought.

I understand you being angry about this. It would be hard not to be. It would 
have been a lot better if Andrei and I had noticed this before much was invested 
in it.


> Just to mention one additional reason for choosing SDLang over one of the more
> popular formats that shared some of the advantages, there is an idea to add
> limited support for (declarative) procedural statements:
> https://github.com/D-Programming-Language/dub/wiki/DEP4#synopsis
> The representation possible with SDLang is not as good as in an actual
> programming language, but far better than with any of the JSON-like languages.

This looks like it's creeping towards inventing a new script programming 
language. Adding loops, switch statements, functions, etc., can't be far off. 
Before you get too far down this path, consider:

1. JSON has a superset programming language - Javascript - which has 
conventional syntax rather than the DEP4 proposal for odd syntax like

     if dub-version="<0.9.24"

which I would strongly recommend against. And, we already have a Javascript 
engine written in D:

     https://github.com/DigitalMars/DMDScript

2. D itself can be used as a scripting language (when # is the first character 
in the source code). Having DUB use this might be quite interesting.


> Otherwise, the language syntax is also quite a natural fit for a curly-brace
> based language. And its simplicity basically renders the "learn" argument moot -
> what you really have to learn is the set of directives that DUB recognizes.
>
> Overall, I don't think the popularity argument actually has much weight, but
> there are indeed a lot of arguments for a better format in general.

 From my other post in this thread about all the problems with going with SDL:

"With a standard json parser in Phobos, zip zap boom you're done. You don't have 
to design it, argue about it, build it, document it, debug it, test it, optimize 
it, explain it, deal with bug requests, deal with enhancement requests, deal 
with legacy compatibility, build a converter, build a gui tool for it, etc."



More information about the Digitalmars-d mailing list