brickgao
V2EX  ›  C

Extending C with cmacro

  •  
  •   brickgao · Jun 11, 2015 · 1942 views
    This topic created in 3994 days ago, the information mentioned may be changed or developed.
    7 replies    2015-06-11 23:11:06 +08:00
    lilydjwg
        1
    lilydjwg  
       Jun 11, 2015
    好棒~但是不如直接去用 Rust 呢。
    mozartgho
        2
    mozartgho  
       Jun 11, 2015
    与其用这种宏魔法,还不如用Lua来扩展C呢
    momo1999
        3
    momo1999  
       Jun 11, 2015
    让我想起了 https://github.com/orangeduck/Cello
    然并卵
    lsmgeb89
        4
    lsmgeb89  
       Jun 11, 2015
    让我想起了 glib 也是一大堆宏
    brickgao
        5
    brickgao  
    OP
       Jun 11, 2015
    @lilydjwg 确实是玩具向的东西(
    erik0
        6
    erik0  
       Jun 11, 2015
    牺牲了可读性
    limhiaoing
        7
    limhiaoing  
       Jun 11, 2015
    很有意思的项目啊,通过类似Rust的Macro扩展C实现了不少C++11类似的特性呢!
    Anonymous Functions -> lambda expression
    Lazy Evaluation -> std::async with std::launch::deferred
    Type-Inferenced Variables -> auto
    Tuples -> std::tuple
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3349 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 10:42 · PVG 18:42 · LAX 03:42 · JFK 06:42
    ♥ Do have faith in what you're doing.