How fast is D compiler on a 100k line project?
Does it support incremental compilation?
How's the package management story and where is D heading in this camp?
Thanks!
vibe.d is quite good
> How fast is D compiler on a 100k line project?
The D reference compiler takes a few seconds on my machine and is about 450k lines.
> Does it support incremental compilation?
Not very well if at all.
> How's the package management story and where is D heading in this camp?
Uninspiring but more than enough to be productive - i.e. infinitely better than C++
On Apple M1, a full rebuild of one of my product (approx. 80kloc) is 6 seconds. 1 seconds incremental.
I have a 140k line multi-purpose library that compiles in 2 1/2 seconds on my i5 computer w/ ssd. But this varies very heavily depending on what language features you use (compile time execution of functions can make a 3 line program compile in many minutes, or simple C-style code can compile 100k lines in a fraction of a second). So don't generalize too fast!
Re web APIs, I've been doing serving and consuming with D for a long time now, I like it a lot. Using some of the compile time reflection stuff is really cool. Like this little demo site: http://arsdnet.net/cgi-bin/survey/record-survey has this source code:
``` import arsd.cgi; import arsd.dom; import arsd.jsvar;
struct Survey { string thisIsFakeDontSpendRealTimeOnIt; string whyD; int yearsUsingD; string[] thingsYouWantMost; }
struct AboutYou { string yourName;
}
class Site : WebObject { @AutomaticForm auto recordSurvey(/* @Flatten */ @DisplayName("") Survey s, @DisplayName("") AboutYou y) { struct Result { string message; Survey surveyAnswers; AboutYou aboutYou; } return Result("Thank you!", s, y); }
// you can also specify things on functions @(Cgi.RequestMethod.GET) @DefaultFormat("json") int giveMeJson(int a) { return a; }
// or have plain boring ones string hello() { return "hello, world!"; }
@UrlName("different-url") string[] anyName(string other) { return ["Hello", "Friends", other]; } }
void handler(Cgi cgi) { cgi.dispatcher!( "/".serveApi!Site ); }
mixin GenericMain!handler; ```
The form is generated from function params, the html from return values, etc. OR you can do json too of course http://arsdnet.net/cgi-bin/survey/different-url?format=json&...
so it is nice. On the client side, I also generate some code so the usage looks like
``` var result = gitlab.rest.users[myuid].pull_requests.GET; ```
and similar so it generates all those things as it needs it (the url made from the dot members, the return value just a dynamic dype). Not like perfect but plenty convenient.
Also, feel free to ask questions about the language (I work for the D foundation).