Hello, Evgeny. Panasyuk, you wrote: EP> std:: variant, std:: function - to what cases you carry? To cases of struggle against windmills. It should be the built in types. AS>> attempt in DSL on pluses EP> it is not simple DSL, and EDSL, with all that it implies. Yes, yes, inconveniently and poorly. Except as proof of concept it is more on what it is not necessary. AS>> Kodogeneratsija is written a maximum for 1 day, EP> Depends from. Any and for 5 minutes, other can much longer - depending on the input description, and integration with a remaining C ++ the code. EP> about what you tell that - most likely any one specific case got to you personally At any deal to achieve similar result by means of metaprogramming occupies at the best 10 times time. Only here also will work further ideally, and in a case metaprogramming with it it is necessary to struggle all time. Half a year with is enough not to work, and then a step aside - and we start to scroll a broad gull of errors: meter, meter, kilometer, meter, meter.... AS>> the code beautiful and pure as tear, optimization/debugging is ideal EP> Only now this code in two different languages, is more exact even on three - for normally there is still a third source language for the generator. EP> in the total, in case of a problem - it is necessary to skip between all three. And considering that there everywhere splice of lines - normal typification as a rule misses also errors only at final compilation (if at all are caught by it) - thus the information poor, is normal only from target language without full callstack'. Yes though in ten places if it is easier, faster and more conveniently. Only here it is necessary to skip just on templates in a heap of places. And in case of the generator in 99 % of cases it is required to check up only an input. About a problem of debugging and typification it you are visible only with (type python-generators) faced. At more serious generators even there is the optimal choice of type/algorithm. Fastening the same clang we get access to AST pluses in a convenient natural type. Further at us the compiler extension actually turns out: we can from pluses other languages (SQL for example), from other languages - pluses, from pluses to transform to pluses, from other languages to transform to other languages, to palm off the most optimal types, to select the most optimal algorithms and ., etc. And all it at a compilation stage. And everywhere there will be a pure and clear syntax without gram . And all will be very simple for debugging it, even not simply, and it is elementary. And speed of compilation will be reactive. And IDE with helps will work ideally. Etc., etc. Metaprogramming in a current type in pluses - is simple not that level. EP> If not to go into extremes are normally used both that and another and and also preprocessor macroes for everywhere there are unique advantages, and unique lacks. Macroes??? The last time their usage saw in 2005-2006. Further in all companies where worked they are forbidden (except the elementary cases) by internal agreements. Appearance of any macro in the code is almost an automatic dip code review. To prove necessity of its usage - practically monumental task. And it is correct - macroes, as well as the metapornography is an axiom : the heap of implicit/unevident events/conversions happens out of attention focus, dependence not only on a local context, syntactic garbage not having any relation to a solved problematics.