On Saturday, 14 July 2012 at 15:18:53 UTC, David Piepgrass wrote:
I think, for multiple reasons including this use case, D should
have a "lightweight subset" with a smaller standard library and
a somewhat simpler language definition (that retains most of
D's power), which could shrink the size of a program that uses
runtime codegen. For simplicity, the D front-end written in D
could use the same backend for CTFE as for its output. And one
hopes that generated code could be garbage-collected.
However, presumably you'd have to include LLVM which I believe
is around 1MB for a bare-minimum build (with no optimization
passes included.)
I support this idea. This simpler subset would be targetted at
embedded devices.
I would imagine a sub-D without generic programming and CTFE, for
instance. The resulting language would retain much enough
functionality for rewriting a bootstrapping compiler.