TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

3 点作者 mingodad超过 4 年前
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

viraptor超过 4 年前
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>