home.social

#macro_rules — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #macro_rules, aggregated by home.social.

fetched live
  1. #macro_rules!

    Right methodology, not nearly powerful enough

    #proc_macros

    Lisp-like methodology, but syn crate and DIY the AST, more importantly, the unholy diabolical compile times involved

    #crabtime

    idk, give reviews

    Only if they learned from #Zig's #comptime/ #OCaml's #ppx

    LET ME WRITE #RUST **AND** MANIPULATE ASTs, NOT AN XOR OF THEM

  2. is it possible to write a Rust macro that transforms:

    macro!(value => {
    a => b,
    c,
    d => e,
    f,
    })
    // with repetition of either declaration format

    into

    match value {
    a => fn(b),
    c => fn(c),
    d => fn(e),
    f => fn(f),
    }
    // etc

    #rust #programming #macro_rules