Top "Metaprogramming" questions

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

Python dictionary from an object's fields

Do you know if there is a built-in function to build a dictionary from an arbitrary object? I'd like to …

python dictionary attributes object metaprogramming
Calling a Method From a String With the Method's Name in Ruby

How can I do what they are talking about here, but in Ruby? How would you do the function on …

ruby metaprogramming
Get the value of an instance variable given its name

In general, how can I get a reference to an object whose name I have in a string? More specifically, …

ruby metaprogramming
What is the __dict__.__dict__ attribute of a Python class?

>>> class A(object): pass ... >>> A.__dict__ <dictproxy object at 0x173ef30> >&…

python class metaprogramming magic-methods
List stored functions that reference a table in PostgreSQL

Just a quick and simple question: in PostgreSQL, how do you list the names of all stored functions/stored procedures …

sql postgresql metaprogramming
How to call methods dynamically based on their name?

How can I call a method dynamically when its name is contained in a string variable? For example: class MyClass …

ruby dynamic metaprogramming
Conveniently Declaring Compile-Time Strings in C++

Being able to create and manipulate strings during compile-time in C++ has several useful applications. Although it is possible to …

c++ string c++11 metaprogramming user-defined-literals
What exactly is metaprogramming?

I was reading an article on TheServerSide on ployglot programming on the Java platform. Some comments in the article refer …

metaprogramming
Get the name of the currently executing method

$0 is the variable for the top level Ruby program, but is there one for the current method?

ruby reflection metaprogramming
Best introduction to C++ template metaprogramming?

Static metaprogramming (aka "template metaprogramming") is a great C++ technique that allows the execution of programs at compile-time. A light …

c++ templates metaprogramming