Compiler | ableC | |
---|---|---|
2 | 1 | |
314 | 35 | |
0.0% | - | |
0.0 | 6.3 | |
almost 2 years ago | 3 days ago | |
D | C | |
GNU General Public License v3.0 or later | GNU Lesser General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Compiler
- Code Red: The Business Impact of Code Quality
-
The Fastest, Safest PNG Decoder in the World
> I'm a big believer in technical continuity.
So am I. D is designed to be an easy transition from C and C-With-Classes. For example, here is some code in C that was translated to D (it's part of the DMD compiler):
C:
https://github.com/DigitalMars/Compiler/blob/dmc-cxx/dm/src/...
D:
https://github.com/DigitalMars/Compiler/blob/master/dm/src/d...
They look pretty much the same. The code generated is the same. In those repositories you can also see how I translated the C versions to D with plenty of examples.
The biggest impediment is the C preprocessor. You wouldn't really want to carry that forward.
After removing dependency on the C preprocessor, most of the work is global search/replacing things like `->` to `.`.
ableC
-
The Fastest, Safest PNG Decoder in the World
I work on (well, mostly near) an extensible C compiler, designed so extension authors can independently create extensions, and users can import them as easily as libraries: https://github.com/melt-umn/ableC/
IMO this approach hasn't taken off because maintaining compatibility with C while adding safety (or really just about any property) means implementing your own sublanguage that can't arbitrarily call C functions while maintaining your safety properties. On the other hand, C being able to call into your sublanguage easier is a benefit versus jury-rigging Cargo into your build system (in the case of Rust).
On the other hand, this approach works great for adding extensions that increase the expressive power of C with new abstractions, for example algebraic data types, C++-like templating, etc.
What are some alternatives?
png-decoder - A pure-Rust, no_std compatible PNG decoder
smhasher - Hash function quality and speed tests
Halide - a language for fast, portable data-parallel computation
wuffs - Wrangling Untrusted File Formats Safely
ivory - The Ivory EDSL
code-maat - A command line tool to mine and analyze data from version-control systems
stb - stb single-file public domain libraries for C/C++