Extending C with cmacro

2015 年 6 月 11 日
 brickgao

https://github.com/eudoxia0/magma

1832 次点击
所在节点    C
7 条回复
lilydjwg
2015 年 6 月 11 日
好棒~但是不如直接去用 Rust 呢。
mozartgho
2015 年 6 月 11 日
与其用这种宏魔法,还不如用Lua来扩展C呢
momo1999
2015 年 6 月 11 日
让我想起了 https://github.com/orangeduck/Cello
然并卵
lsmgeb89
2015 年 6 月 11 日
让我想起了 glib 也是一大堆宏
brickgao
2015 年 6 月 11 日
@lilydjwg 确实是玩具向的东西(
erik0
2015 年 6 月 11 日
牺牲了可读性
limhiaoing
2015 年 6 月 11 日
很有意思的项目啊,通过类似Rust的Macro扩展C实现了不少C++11类似的特性呢!
Anonymous Functions -> lambda expression
Lazy Evaluation -> std::async with std::launch::deferred
Type-Inferenced Variables -> auto
Tuples -> std::tuple

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/197702

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX