1. 16
  1.  

  2. 8

    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.

    1. 7

      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:

      https://github.com/vibe-d/vibe.d/issues/2282

      I tried Tango, but it doesnt seems to work with Windows:

      https://github.com/SiegeLord/Tango-D2/issues/104

      Finally I tried “std.net.curl”, but it doesnt offer a static library either:

      https://issues.dlang.org/show_bug.cgi?id=15841

      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?

      https://wiki.dlang.org/Curl_on_Windows

      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:

      1. Go https://golang.org/pkg/net/http
      2. Rust https://github.com/hyperium/hyper
      3. Nim http://nim-lang.github.io/Nim/httpclient
      1. 5

        I found requests to be a good one.

        1. 1

          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.

          1. 1

            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

            https://github.com/ikod/dlang-requests#library-configurations

            but if thats the case why does it need vibe.d at all? hmm

        2. 0

          You’ve had this complaint before but I don’t get it. What’s the problem with shipping a dll next to your exe?

          1. 2

            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.

        3. 6

          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.

          1. 5

            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.

            1. 3

              Thank you.

              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.

              1. 1

                The ABI should just work. Otherwise it’s a bug.