Date: Sat, 17 Oct 2026 06:19:29 +0500
Purpose of the email:
Guidance since even with tools like awk, lex, yacc, and many more, I need
to know what to make before I do so, and before I can maybe propose adding
it to boost, and then perhaps to the standard library (if it made sense
to). I simply can't stop thinking about it.
Intro:
Metaprogramming was traditionally seen as a mixture of using functional
lexical tools like macros with some build scripts that themselves we're
usually functional, in that you can only append state and pass it down to
sub directories rather than change them outright. This led to some clever
build systems like the Kbuild system of Linux.
How c++ made an entry:
C++ as a language provided a way to bypass lexical tools like macros for
the most part giving us in language tools for doing metaprogramming inside
the current source file. However we still rely more and more build scripts
to metaprogram the action of "connecting" multiple source files or making
them work with each other.
What I am thinking about:
If c++ could help provide a metaprogramming facilities specifically design
to bypass other build scripts while still providing the same functional
approach as those scripts usually do (approach where you can't just change
state) then we might have typed metaprogramming on a level that we could
never have imagined.
Previously I had this idea of bypassing built system but I realized that I
had an incomplete image in mind, to do so, I thought about it for a year,
read about the Linux build system how it interacts with .config generated
by kconfig. The reason I talk about the Linux built system is that it is
that out of all built systems that I have seen, the Kbuild system is the
most well designed one when it comes to how the interface matches the needs
of most developers. This made me realize that to metaprogram your way into
joining multiple files, you must allow source files to:
1. Include other source files as files directly, and to be able to do so
based on predicates.
2. To give those predicates access to some user defined
parameters/configuration.
3. For there to be a interactive way to define those parameters, and to
access them.
4. For there to be state that you can only append to (to keeps things
predictable and manageable).
5. To maybe have an additional namespace like construct to differentiate
between code in the current source file (or linked code), and code that is
included.
Guidance since even with tools like awk, lex, yacc, and many more, I need
to know what to make before I do so, and before I can maybe propose adding
it to boost, and then perhaps to the standard library (if it made sense
to). I simply can't stop thinking about it.
Intro:
Metaprogramming was traditionally seen as a mixture of using functional
lexical tools like macros with some build scripts that themselves we're
usually functional, in that you can only append state and pass it down to
sub directories rather than change them outright. This led to some clever
build systems like the Kbuild system of Linux.
How c++ made an entry:
C++ as a language provided a way to bypass lexical tools like macros for
the most part giving us in language tools for doing metaprogramming inside
the current source file. However we still rely more and more build scripts
to metaprogram the action of "connecting" multiple source files or making
them work with each other.
What I am thinking about:
If c++ could help provide a metaprogramming facilities specifically design
to bypass other build scripts while still providing the same functional
approach as those scripts usually do (approach where you can't just change
state) then we might have typed metaprogramming on a level that we could
never have imagined.
Previously I had this idea of bypassing built system but I realized that I
had an incomplete image in mind, to do so, I thought about it for a year,
read about the Linux build system how it interacts with .config generated
by kconfig. The reason I talk about the Linux built system is that it is
that out of all built systems that I have seen, the Kbuild system is the
most well designed one when it comes to how the interface matches the needs
of most developers. This made me realize that to metaprogram your way into
joining multiple files, you must allow source files to:
1. Include other source files as files directly, and to be able to do so
based on predicates.
2. To give those predicates access to some user defined
parameters/configuration.
3. For there to be a interactive way to define those parameters, and to
access them.
4. For there to be state that you can only append to (to keeps things
predictable and manageable).
5. To maybe have an additional namespace like construct to differentiate
between code in the current source file (or linked code), and code that is
included.
Received on 2026-10-17 01:19:43
