Nim, for one. It has an incredibly powerful macro and template system. But other languages with similar macro power include Elixir and Julia.
D has a generic system similar to Nim's, and a mixin system similar to Nim's templates, but doesn't have a powerful AST-manipulating macro system like the above languages.
D has a generic system similar to Nim's, and a mixin system similar to Nim's templates, but doesn't have a powerful AST-manipulating macro system like the above languages.