by teleforce · 1y ago · 0 comments
Together with intuitive function calling facility using Uniform Function Call Syntax or UFCS you can easily has natively compiled scripting environment [2],[3].
[1] Pragmatic D Tutorial:
https://qznc.github.io/d-tut/hello.html
[2] Why I use the D programming language for scripting (2021) (50 comments):
https://news.ycombinator.com/item?id=36928485
[3] Uniform Function Call Syntax:
Tcc has the `-run` flag for easily doing this with a normal-ish shebang.
With a nasty polyglot preamble of C and bash at the top of your file, you can do it with any compiler.
But if you insist, D now supports and can compile C language that you can perform using rdmd [2].
[1] C shell:
https://en.wikipedia.org/wiki/C_shell
[2] Adding ANSI C11 C compiler to D so it can import and compile C files directly (105 comments):