01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
C言語をコンパイル時にD言語に変換する。 すでに誰かが作っていそう。
hello.c
#include <stdio> int main(void) { printf("hello world\n"); return 0; }
hello.d
import cc; mixin(compile!("hello.c"));
こんな感じでつかうのを作れそうだ。