On Wednesday, 23 December 2020 at 19:00:14 UTC, evilrat wrote:
On Wednesday, 23 December 2020 at 18:03:56 UTC, frame wrote:

It's not the problem mentioned but I had to struggle with DLLs and D's Variant-type. The problem is that Variant uses TypeInfo which does not pass DLL boundaries correctly so that int != int in runtime even it's in fact a simple int.

If you need to exchange unknown data between a DLL and your application you need to get a workaround and cannot use that elsewhere settled nice feature. But it's a Windows specific issue - it works as expected on other systems.

Which is basically same as in C++, despite the fact it does have real working SO/DLL runtime's many large projects have their own RTTI implementation. LLVM has its own RTTI because standard type info is "inefficient", Unreal Engine has its own, IIRC Qt too has its own, etc...

Same thing with D Variant, some people say it is "inefficient"... so we ended up having multiple libraries.

Not saying anything about how good or bad all this, just the facts.

C++ you need to write duplicate code (.h and .cpp)

C++ you need to care about header include order

C++ you need to forward declare everything you gonna use if it is not included before

C++ you need to waste time waiting for compile

C++ you need to fight to get proper reflection


D is much more superior to C++ in my opinion, proper package manager, great compile time, great module system, great interop with C and C++

You can use GC, you can disable it, you can use malloc, it suits all your need!

Can't find a lib? use a C or C++ one, that is what makes D so much powerfull, you don't have to give up on other ecosystem, you can embrace them in your project
  • C++ or D? Mark via Digitalmars-d-learn
    • Re: C++ or D? Paul Backus via Digitalmars-d-learn
    • Re: C++ or D? H. S. Teoh via Digitalmars-d-learn
    • Re: C++ or D? Guillaume Piolat via Digitalmars-d-learn
    • Re: C++ or D? realhet via Digitalmars-d-learn
    • Re: C++ or D? Ola Fosheim Grøstad via Digitalmars-d-learn
    • Re: C++ or D? hgriffin via Digitalmars-d-learn
      • Re: C++ or D? Godnyx via Digitalmars-d-learn
        • Re: C++ or D? frame via Digitalmars-d-learn
          • Re: C++ or D... evilrat via Digitalmars-d-learn
            • Re: C++... RSY via Digitalmars-d-learn
              • Re:... sighoya via Digitalmars-d-learn
              • Re:... Paulo Pinto via Digitalmars-d-learn
                • ... RSY via Digitalmars-d-learn
                • ... RSY via Digitalmars-d-learn
                • ... RSY via Digitalmars-d-learn
                • ... RSY via Digitalmars-d-learn
                • ... RSY via Digitalmars-d-learn
                • ... RSY via Digitalmars-d-learn
                • ... Imperatorn via Digitalmars-d-learn
                • ... Ola Fosheim Grostad via Digitalmars-d-learn

Reply via email to