www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Are there any notable libraries written in D which have gotten

reply Liam McGillivray <yoshi.pit.link.mario gmail.com> writes:
I've only really joined the D community and started programming 
it rather recently. So far, the most of the libraries I've seen 
are either D bindings to C & C++ programs, or tools related to 
the language itself. Of the ones that aren't, I've seen none that 
say anything about being used by other languages. In short, all 
the D libraries I'm aware of appear to be made specifically for 
use by D programs.

Of the libraries I know of that are often used outside the 
language they are written in, most are in C. All the one's that 
aren't are in C++.

But are there any exceptions that I should be aware of? Are there 
any libraries that have been written in D, and then gotten 
considerable use by programmers without D experience, in programs 
not written in D?

I would think that this would be technically viable with the 
`betterC` option, though the difficulty would be in advertising 
it's compatibility to non-D programmers.
Apr 20
parent Lance Bachmeier <no spam.net> writes:
On Saturday, 20 April 2024 at 22:26:41 UTC, Liam McGillivray 
wrote:

 But are there any exceptions that I should be aware of? Are 
 there any libraries that have been written in D, and then 
 gotten considerable use by programmers without D experience, in 
 programs not written in D?

 I would think that this would be technically viable with the 
 `betterC` option, though the difficulty would be in advertising 
 it's compatibility to non-D programmers.
You don't need betterC for that. You can call regular D from other languages just fine. I've spent years writing libraries in D that can be called from R (but just for my own use). As for those types of libraries becoming popular with other language developers, well, I think that most anyone willing to trust a D library instead of a C library would have a strong preference to write their whole program in D. One reason C libraries are popular as extensions is because writing C sucks so furiously that you only want to write the minimum necessary in C and then get back to using a language with features.
Apr 20