TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Rust parser accepting subset of C/C++

3 pointsby mingodadover 4 years ago
Maybe the rust community may not like this but a rustc with the a modified parser that accept a subset of C&#x2F;C++ could help with extra compile time checks to a good subset of C&#x2F;C++ as an auxiliary tool, I found this project&#x2F;hn submission that uses macros to accept a Java like syntax https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17734648 that is interesting but due to using macros is a bit limited.<p>Does anyone know any similar project preferable with a modified parser that allow a more natural C&#x2F;C++ syntax ?<p>In theory even with the different basic assumption of pass by value versus move by default, I believe that&#x27;s possible to achieve an interesting result.

1 comment

viraptorover 4 years ago
You may be interested in Zig. <a href="https:&#x2F;&#x2F;andrewkelley.me&#x2F;post&#x2F;zig-cc-powerful-drop-in-replacement-gcc-clang.html" rel="nofollow">https:&#x2F;&#x2F;andrewkelley.me&#x2F;post&#x2F;zig-cc-powerful-drop-in-replace...</a>