The C++ reflection proposal starts with pretty solid metadata and is heading towards generative C++ with https://herbsutter.files.wordpress.com/2017/07/p0707r1.pdf …, but I'm not smart enough to understand this nor why it's preferable to the simple LISP [quasi]quote[-unsplicing].
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
i have such a system, and i don't know what you are talking about
-
there should be no need for nested macros to "negotiate with each other"; each macro should be treated as a black box, a builtin abstraction.
- 21 more replies
New conversation -
-
-
A simple approach that has worked well for me is to introduce a new stage between compile-time and run-time. The AST is passed to a metaMain() function which outputs a new transformed AST, which is compiled to a program. This stage is interpreted, and can call any function.
-
Interesting. How did you implement this? Does the interpreter call into native functions using interfaces defined by template metaprogramming, by low-level tricks, or by parsing C++ code to scrape function definitions?
- 1 more reply
New conversation -
-
-
I assume you're already aware of
@Jonathan_Blow 's language? Where compile-time macros, runtime code and even the build system specification can all be written in the same (Turing compete) language and can communicate with each other.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I prefer multi-stage programming, to keep all the code expansion / rewriting at compile time (where the rewrite rule / macro authors can debug it better), and deliver guaranteed runtime results. Best recent work I've seen (see PDFs at bottom):https://github.com/epfldata/squid#gpce17 …
-
Multi-stage programming doesn’t imply “compile time” though does it? I saw a presentation on someone doing it in a Lisp REPL (I think Common Lisp to be exact).
- 1 more reply
New conversation -
-
-
Semi-related, a long time ago I was working on prox: middleware for JavaScript Proxy objects, so different instrumentations could work together.https://github.com/rektide/prox
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
i've seen such a solution in Terra, which I liked, considering the constraints (it would also work for C), but with full inference, this is not required.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
Show additional replies, including those that may contain offensive content
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.