The talk covers the psychology of language adoption, how C++ conquered the world and how D can learn/shamelessly streal from it.
OP and speaker here. AMA.
I like D, it is more high level than C without becoming bloated like C++ or C#.
However what has kept me away is library support. For my use I must have an HTTP
client, and I cant seem to find one thats workable. I tried Vibe, but it doesnt
offer static library:
I tried Tango, but it doesnt seems to work with Windows:
Finally I tried “std.net.curl”, but it doesnt offer a static library either:
I am not totally averse to compiling my own static library, but it seems you
have to manually edit the cURL source to do it?
I drew the line there, it just seems too painful currently to get what I want
working, while other languages in this space have solved the problem:
I found requests to be a good one.
I think this request package will have same issue as vibe.d, It relies on dynamic OpenSSL library and does not have an option for a static library (which @cup is after, if I understand it right).
it seems that static includes of these types of library is a higher-level packaging function, and unlikely to be solved by individual package maintainers, unfortunately.
actually after some testing “requests” does create a single executable
i think its because it uses std.socket by default instead of vibe.d for network IO
but if thats the case why does it need vibe.d at all? hmm
You’ve had this complaint before but I don’t get it. What’s the problem with shipping a dll next to your exe?
The point is I should be able to choose. I should be able to do nothing more than pass a compiler flag to get static or shared linking. But that’s not possible with some of the libraries as it seems they didn’t make a static build.
Thank you engagement @atilaneves !
3 questions/topics from my side
a) can BetterC be used to link/leverage large C++ libraries (eg QT or boost). That is, can BetterC be used as essentially C++ replacement (and without D’s GC, D’s standard library (Phobos), and any other D-run time dependencies) ? For example, can I build a QT or wxWidget based app for FreeBSD, Linux, Windows, MacOS using BetterC and QT only?
b) Can you describe for, us, non-D folks, the DIP1000 (this seems to be a feature implementing Rust-like semantic for pointers… but it compare/contrast was not clear)
c) Mobile app development – does D have roadmap/production ready capabilities in this area, and for which platforms
Thank you again for your time.
I don’t see how betterC helps with calling C++. D can already call C++ now, it’s just not easy, especially if they’re heavily templated.
DIP1000 is D’s answer to Rust’s borrow checker. You can read the dip here. Essentially it makes it so you can’t escape pointers.
There’s been some work done for Android, but the person doing that left the community. It was possible to run D there, but I’m not sure what the current status is.
WRT C++ D compatibility, I watched a video for this paper https://www.walterbright.com/cppint.pdf
but, if I remember right, it was 2015 – and I could not figure out if, after D was officially included in GCC, there were any updates to C++ ABI compatibility feature.
The ABI should just work. Otherwise it’s a bug.