Top "Metaprogramming" questions

Metaprogramming is the capability to reprogram ones programming environment, as with macros or metaclasses.

Python dynamic function creation with custom names

Apologies if this question has already been raised and answered. What I need to do is very simple in concept, …

python python-2.7 closures metaprogramming dynamic-function
Compile time string hashing

I have read in few different places that using C++11's new string literals it might be possible to compute …

c++ metaprogramming c++11 hash
C++ SFINAE examples?

I want to get into more template meta-programming. I know that SFINAE stands for "substitution failure is not an error." …

c++ templates metaprogramming sfinae
Adding an instance variable to a class in Ruby

How can I add an instance variable to a defined class at runtime, and later get and set its value …

ruby metaprogramming
Python vs. Ruby for metaprogramming

I'm currently primarily a D programmer and am looking to add another language to my toolbox, preferably one that supports …

python ruby lisp metaprogramming
Dynamic Class Definition WITH a Class Name

How do I dynamically define a class in Ruby WITH a name? I know how to create a class dynamically …

ruby class dynamic metaprogramming
Safe way to extract property names

I'm looking for a way to get an object property name with typechecking that allows to catch possible regressions after …

typescript reflection metaprogramming
Programmatically create static arrays at compile time in C++

One can define a static array at compile time as follows: const std::size_t size = 5; unsigned int list[size] = { 1, 2, 3, 4, 5 }; …

c++ metaprogramming static-array
How do I get constants defined by Ruby's Module class via reflection?

I was trying to get Matz and Flanagan's "Ruby Programming Language" metaprogramming chapter into my head, However I couldn't understand …

ruby reflection metaprogramming
Can you make custom operators in C++?

Is it possible to make a custom operator so you can do things like this? if ("Hello, world!" contains "Hello") ... …

c++ templates operators c-preprocessor metaprogramming