Re:Zig cc: A drop-in replacement for GCC/Clang
by gameswithgo on Tuesday March 24, 2020 @11:07PM
(#22681628)
>However, LLVM is consistently 5% worse than the GCC toolchain at performance across multiple benchmarks
That is true, but it is ALSO true that LLVM is consistently 5% better than the GCC toolchain at performance across multiple benchmarks
Re:Zig cc: A drop-in replacement for GCC/Clang
by kick on Wednesday March 25, 2020 @01:32AM
(#22682210)
D seems like its pitch is "a better C++," but "a better C" doesn't seem quite right.
Re:Zig cc: A drop-in replacement for GCC/Clang
by nurettin on Wednesday March 25, 2020 @02:26AM
(#22682415)
D's whole premise of "being a better C++" has always made them look like argumentative jerks. Why build a language on top of a controversy? Their main argument from early 2000s: C++ requires a stdlib and compiler toolchain is not required to provide one. Wtf D? I mean I understand that C++ provides a lot of abstractions on top of C to call itself "more" than C, but what does D provide other than a few conveniences? If you even consider garbage collection or better looking syntax or more consistent, less orthogonal sytax a convenience. It didn't even have most of it's current features when it was first out back in early 2000s. Trying to gain adoption through creating some sort of counterculture what are they? 14?. /oneparagraphrant
Re:Zig cc: A drop-in replacement for GCC/Clang
by diegoperini on Wednesday March 25, 2020 @07:37AM
(#22683633)
It is probably the case that D has a brilliant engineer team who doesn't really focus on the PR side of things. D definitely provides value over C/C++ other than a few sugars for the syntax. It is just not communicated that well.
Re:Zig cc: A drop-in replacement for GCC/Clang
by Reelin on Wednesday March 25, 2020 @02:18AM
(#22682386)
It has an official subset and associated compiler flag. (https://dlang.org/spec/betterc.html)
Re:Zig cc: A drop-in replacement for GCC/Clang
by aidenn0 on Tuesday March 24, 2020 @11:02PM
(#22681598)
Can DMD compile C programs though? That's what "zig cc" does, and it's so much easier to get up-and-running than any crossdev setup I've used before.
Re:Zig cc: A drop-in replacement for GCC/Clang
by crazypython on Wednesday March 25, 2020 @12:04PM
(#22685854)
Yes.
It has manual memory management as well as garbage collection. You could call it hybrid memory management. You can manually delete GC objects, as well as allocate GC objects into manually allocated memory.
The Zig website says "The reference implementation uses LLVM as a backend for state of the art optimizations." However, LLVM is consistently 5% worse than the GCC toolchain at performance across multiple benchmarks. In contrast, GCC 9 and 10 officially support Dlang.
Help us update the GCC D compiler frontend to the latest DMD.
Help us merge the direct-interface-to-C++ into LLVM D Compiler main. https://github.com/Syniurge/Calypso
Help us port the standard library to WASM.