Top "Metaprogramming" questions

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

Template Metaprogramming - I still don't get it :(

I have a problem... I don't understand template metaprogramming. The problem is, that I’ve read a lot about it, …

c++ templates metaprogramming
How Pony (ORM) does its tricks?

Pony ORM does the nice trick of converting a generator expression into SQL. Example: >>> select(p for …

python orm metaprogramming dsl ponyorm
Ruby: How to chain multiple method calls together with "send"

There has to be a built in way of doing this, right? class Object def send_chain(arr) o=self …

ruby metaprogramming
Can I add numbers with the C/C++ preprocessor?

For some base. Base 1 even. Some sort of complex substitution -ing. Also, and of course, doing this is not a …

c++ c metaprogramming preprocessor
Does Javascript have something like Ruby's method_missing feature?

In Ruby I think you can call a method that hasn't been defined and yet capture the name of the …

javascript ruby metaprogramming
SFINAE to check for inherited member functions

Using SFINAE, i can detect wether a given class has a certain member function. But what if i want to …

c++ templates metaprogramming sfinae
How to pass arguments to the metaclass from the class definition?

I'm trying to dynamically generate classes in python 2.7, and am wondering if you can easily pass arguments to the metaclass …

python metaprogramming python-2.x metaclass
Dynamically define named classes in Ruby

I am writing an internal DSL in Ruby. For this, I need to programmatically create named classes and nested classes. …

ruby metaprogramming dsl metaclass
Syntactic sugar in C/C++

I have been looking into Ruby and find its keywords "until" and "unless" very interesting. So I thought what was …

c++ c syntax metaprogramming syntactic-sugar
Metaprogramming in C++ and in D

The template mechanism in C++ only accidentally became useful for template metaprogramming. On the other hand, D's was designed specifically …

c++ metaprogramming d