Earlier quoted context omitted.
How would that even work? Modern C++ libraries are largely templates, templates which must be instantiated at compile-time i.e. you need a full C++ compiler to use C++ libraries directly. Said compiler must somehow work together with the D compiler here, which should lead to god-awful memory use, compilation time, and error messages.
You should probably read up on ABI Compatibility, and, Compiling vs linking as well. Let's be clear a compiler builds a object files that have to be linked to create a executable binary. IE compiler makes .o files. Linker takes output object files from the compiler an puts them (.o,.so/.dll,.a) together, to make .exe files. This all works because you are linking to the C/C++ library binaries (the .o, .so, .a, .dll) f…
D Language accepted for inclusion in GCC
61–70 of 235 posts
Re: D Language accepted for inclusion in GCC
#62Earlier quoted context omitted.
How would that even work? Modern C++ libraries are largely templates, templates which must be instantiated at compile-time i.e. you need a full C++ compiler to use C++ libraries directly. Said compiler must somehow work together with the D compiler here, which should lead to god-awful memory use, compilation time, and error messages.
You should probably read up on ABI Compatibility, and, Compiling vs linking as well. Let's be clear a compiler builds a object files that have to be linked to create a executable binary. IE compiler makes .o files. Linker takes output object files from the compiler an puts them (.o,.so/.dll,.a) together, to make .exe files. This all works because you are linking to the C/C++ library binaries (the .o, .so, .a, .dll) f…
Templates are delivered as C++ include files (i.e. source code). When you use them, the compiler fills in the types you want and compiles the result.
For example, there's the std::vector template. You can fill in any type that meets the specific requirements of the template and use it like std::vector or std::vector.
However, you probably won't be able to do std::vector. ABI compatibility is not enough to do this as you would be effectively mixing C++ and D source code here.
Re: D Language accepted for inclusion in GCC
#63Re: D Language accepted for inclusion in GCC
#64Re: D Language accepted for inclusion in GCC
#65Earlier quoted context omitted.
> The reference backend was only Open Source (not freely redistributable). Free redistributibility is part of the Open Source Definition. It is literally the first item: https://opensource.org/osd-annotated
I think they meant lower case "open source" (as in the source is open (anyone can read/compile it)). There are plenty of software that are open source but not freely distributable, such as Unreal Engine.
Collins still has the old definition "free to use or modify". Merriam-Webster and Oxford has since included "redistribution" in the definition.
The term "shared source" is not in any dictionary though.
Re: D Language accepted for inclusion in GCC
#66Earlier quoted context omitted.
Likely none. Well, I guess that's kind of an oversimplification though so here's the detailed story: We require some per-target integration to provide correct version(ARM), version(linux) statements in D code and we need to know the size of a mutex on the target system. Iain is currently rewriting this code here: https://github.com/D-Programming-GDC/GDC/pull/500 However, we already provide and the new, rewritten code…
Glad to hear there's work in progress. Last time I tried to configure gcc + gdc on AIX on PowerPC, I found out it was explicitly disabled in the configure script, and I didn't dig any deeper to find out why or the potential work involved.
Back then we had a shell script hack that was called by the GCC configure script and parsed the target triplet to set these versions.
Fortunately that's long gone and we now simply add some D specific code to the platform configuration files in gcc/config/ . The shell script hack would have never passed the GCC review ;-)
Re: D Language accepted for inclusion in GCC
#67Earlier quoted context omitted.
D seems like a more useful Rust, or is that completely wrong?
D is like Go if Go had actually been a "systems" programming language. Rust is difficult to compare to other stuff.
Re: D Language accepted for inclusion in GCC
#68Earlier quoted context omitted.
D seems like a more useful Rust, or is that completely wrong?
D is like Go if Go had actually been a "systems" programming language. Rust is difficult to compare to other stuff.
Re: D Language accepted for inclusion in GCC
#69Earlier quoted context omitted.
You should probably read up on ABI Compatibility, and, Compiling vs linking as well. Let's be clear a compiler builds a object files that have to be linked to create a executable binary. IE compiler makes .o files. Linker takes output object files from the compiler an puts them (.o,.so/.dll,.a) together, to make .exe files. This all works because you are linking to the C/C++ library binaries (the .o, .so, .a, .dll) f…
That's not how C++ templates work. You cannot deliver them as binaries. Templates are delivered as C++ include files (i.e. source code). When you use them, the compiler fills in the types you want and compiles the result. For example, there's the std::vector template. You can fill in any type that meets the specific requirements of the template and use it like std::vector or std::vector . However, you probably won't…
I think this should be working. You don't have to 'mix source code', you can implement YourDClassType in D and use it in C++. You simply have to write a C++ header describing the class. Then write a D file describing the external C++ sdt::vector file and link everything together.
Not sure if anybody actively tested this though ;-)
Re: D Language accepted for inclusion in GCC
#70There has been out-of-tree GCC support for D for several years. I wonder what has changed that they're letting it in to the official repository.
My guess is that is also why. gcc wants to be assured there are sufficient maintainers. If a crew has been maintaining out-tree-support with a good track record, that demonstrates maintainability.