3

I stumbled across Terra last year, and the most similar language I can think of is Julia. Terra is inspired by and uses Lua for templating/metaprogramming instead of being derived from e.g. the Lisp or ML families, but like many JITted language implementations it blurs the line between compile-time and run-time.

Are there any other low-level (no VM, small runtime, etc.) programming languages I'm missing that can compile and run code at runtime (besides assembly)? Maybe Forth-likes, or Extempore's xtlang? Terra calls this (multi-)staged programming.

2 Answers2

1

No. So far the only ones I've found are pretty obscure/old, both variations of C:

0

Graphics programming languages like OpenGL and Metal often get compiled at runtime. Because at build time you don't even know what processor the code will run on, and the code to be compiled might itself be constructed at runtime.

gnasher729
  • 32,238
  • 36
  • 56