Questions tagged [meta-programming]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
14 votes
6 answers
4k 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,111
13 votes
1 answer
762 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
  • 356
5 votes
4 answers
157 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