Skip to main content

Questions tagged [meta-programming]

The tag has no usage guidance.

15 votes
6 answers
5k views

"Testing" that something does not compile in metaprogramming

Use case Some languages offer techniques to ensure certain requirements at compile time. For example, rust has the NonZeroU32 type that will ensure at compile time ...
mousetail's user avatar
  • 8,531
14 votes
1 answer
870 views

Is there a difference between Rust's `macro_rules!` and Scheme's `syntax-rules`?

This is an example for the use of Rust's macro_rules!: ...
ceving's user avatar
  • 376
5 votes
4 answers
200 views

What alternatives to macros there is for meta programming on compile time? [closed]

For example instead of macros Zig has comptime feature that allows codegen like implementation of arbitrary arity functions while being native Zig code and not some separate macro language that isn't ...
Viola's user avatar
  • 73