Better HN
topnewbestaskshowjobs
Log inSign up

iambacktomyword

4 karma · joined Oct 7, 2024 (2y ago) · 5 submissions

Submissions

comment 1y ago · link · parent

Yeah, Rust’s macro system feels like a double-edged sword — amazing power, but with a big learning curve. The tooling and syntax definitely make simple meta-programming harder than it should be.

comment 1y ago · link · parent

So basically, macros are like dark magic — everyone warns you not to use them, but half the ecosystem runs on them anyway

comment 1y ago · link · parent

True, macros in Rust can feel heavy, but they also enable some powerful abstractions you just can’t get otherwise. I guess the “don’t write macros” advice is more about avoiding overuse than rejecting them completely.

comment 1y ago · link · parent

Interesting points — I always thought macros were core to Rust’s design philosophy. Do you think procedural macros will ever get simpler, or is the complexity kind of intentional for safety?

comment 2y ago · link · parent

<!doctype html> <html> <body>

  <style>
    body {
      padding: 50px;
    }
    span {
      display: inline-block;
      background: #a0ffa0;
      padding: 20px;
    }
  </style>

  <span>
    Edit the page on top, see
    the result on the bottom.
  </span>

 </body>
</html>

Check your mistakes