Show HN: C3 – A C alternative that looks like C
Aaaa, people are doing a lot of C alternatives lately, I should really make a post for my C alternative before the field is <i>completely</i> saturated... But it&#x27;s not ready yet :(<p>I kind of want to at least get hashmaps in before I go public.<p>Re C3, I think the README could do with more sample code? Not exactly &quot;Hello World&quot;, but something to get you hyped about using it.<p>Things I like:<p>- macros! macros are fucking awesome. giv examples<p>- modules are just a straight win<p>- built-in dynamic arrays, yess.<p>- compile-time execution is kind of a precondition for macros. Hopefully the same system.<p>- I&#x27;ve always wanted to play with generic modules. `import foo!(int) as IntFoo;` It seems a logical extension.<p>- Result-based error handling <i>for the win.</i> Though it really depends on language support how straightforward this is; it can easily degenerate into very spammy error handling. Definitely would like to see examples of this.<p>- Built-in strings: hopefully UTF-8!<p>- No preprocessor. Heck yes, it&#x27;s a crutch.<p>- Pre&#x2F;postconditions are nice, but they make a lot of mess on inheritance.<p>- Immutability by default is definitely a win.<p>Things you should totally steal from my language: :)<p>- Format strings are just nice.<p>- Packages as a generalization of modules: a package is a folder in the same way a module is a file. Dependencies between packages must be explicitly stated. This makes the build system&#x27;s dependency tracking actually meaningful by effectively doing away with the global search path. I wish more languages would do this.<p>- D recently acquired automatic C header file import. (Neat has this as a macro.) I cannot overstate how useful this is for hitting the ground running.<p>- I don&#x27;t know if your macro implementation has quasiquoting (it&#x27;s hard to tell from the examples) but if not: <i>add it</i>. This makes macros immensely more convenient.