Skip to main content

Questions tagged [meta-programming]

Programs or functions that alter the behavior of other programs or functions.

0 votes
1 answer
150 views

structs are great, the only problem is that not only do they associate data (topo)logically, they also crystallise a memory layout for that set of concepts. I would like to avoid the latter. So I'm ...
Engineer's user avatar
  • 781
-1 votes
1 answer
143 views

After reading the whole question, you might think why I even need this, but believe me, it has a crucial usage in my project, which is very broad and complex, so I will only include the things ...
Aries Victor's user avatar
6 votes
1 answer
366 views

The CppCoreGuidelines contain the following: T.65: Use tag dispatch to provide alternative implementations of a function [...] Example struct pod_tag {}; struct non_pod_tag {}; template<class T&...
Jan Schultke's user avatar
1 vote
1 answer
461 views

I wish to develop an application that can generate code based on an user input. Long story short: a user gives a formal description of a Resource (can be viewed as a REST resource) and based on this ...
jbolt's user avatar
  • 131
5 votes
4 answers
415 views

My question is about the way to represent data models created at runtime. To illustrate, let's say we would like to create a CMS-like app in which end-users may create custom forms. Those forms are ...
ibi0tux's user avatar
  • 241
107 votes
10 answers
22k views

I employ a lot of meta-programming to avoid repetitive tasks and build safer-to-use abstractions. I recently moved to a new job where I am working in a larger team and this worries some of my ...
kamikaze's user avatar
  • 1,080
4 votes
2 answers
4k views

When I first saw this meme: I thought to myself, yeah right, but now I am not sure any more. So was template meta programming in C++ discovered by accident as the meme claims or was it intentional? ...
Mr. Developerdude's user avatar
1 vote
1 answer
221 views

I am working with Ruby on Rails at work and have been reading the Pragmatic Programmer on the side. I was given the task to create some small registration application with ~10 form fields. From my ...
Pithikos's user avatar
  • 232
12 votes
1 answer
2k views

I've heard that Clojure macros are easier to write but not as reliable as Racket's hygienic macros. My question has 2 parts: How does gensym differ from hygienic macros? What do Racket macros provide ...
Alex's user avatar
  • 284
2 votes
1 answer
309 views

(preface - boring stuff, feel free to skip down to the implementation details) I need to provide exception handling to a language I am working on. It "compiles" to a subset of C, and since I ...
dtech's user avatar
  • 763
1 vote
0 answers
56 views

I'm trying to make a meteor app which every user can extend. Meteor uses hot code swapping which I would like to use, so I'd probably need to save scripts on file system of the server. Have You got ...
Krzysztof Wende's user avatar
1 vote
1 answer
568 views

I recently wrote a fairly complex C++ meta function that boils down to: template <size_t N, typename val> struct Rec { using type = typename std::conditional<N == 0, val, ...
Matt Bierner's user avatar
2 votes
2 answers
181 views

(I am currently using groovy but it should apply to most OO languages so I also put the langauge-agnostic tag) I try to program in a function style which also includes method chaining and avoiding ...
valenterry's user avatar
  • 2,429
13 votes
3 answers
5k views

This started out as a SO question but I realized that it is quite unconventional and based on the actual description on the websites, it might be better suited to programmers.se since the question has ...
Steven Lu's user avatar
  • 539
26 votes
4 answers
46k views

I bet I could answer that myself if I knew more about tools to analyze how C#/JIT behaves but since I don't, please bear with me asking. I have simple code like this : private SqlMetaData[] meta;...
Serge's user avatar
  • 901

15 30 50 per page