Hi,

Just dropping by to say kudos for Terra!

I know it was announced 2 years ago but I couldn't go much into it
back then, so I've only read the "Design of Terra" paper today and I
was very impressed with how much thought it was put into it, including
leveraging the right combination of technologies (LLVM and LuaJIT's
FFI) to make it happen.

I also read the feedback from the Lua and LuaJIT mailing lists and
from HackerNews and I was kinda disappointed by the reactions. Well,
it's not something instantly grok'able I guess... For me it was the
following paragraph from the paper that put things together once and
for all in my brain:

"it is possible to think of every statically-typed language as a
meta-program containing multiple languages. One language, at the top
level, instantiates entities like types, function definitions,
classes, and methods. Another language in the body of functions
defines the runtime behavior. The top-level language “evaluates” when
the compiler for that language is run producing a second stage
containing the actual program."

That is a powerful mental model for thinking about static languages,
so now I have a lot to think about :) Thank you for that.

Regards,
Cosmin.


PS: Jonathan Blow (an indie game programmer) is currently designing a
C-level language with cache-friendly properties (eg. allows switching
memory layouts between array-of-structs and struct-of-arrays, etc.).
It would be interesting to see how much can Terra be augmented with
such features until reaching the breaking point where new syntax needs
to be introduced to support them. Incidentally, his language also
contains a Turing-complete top-level language (per your multi-language
model) which is the same language as the one which is compiled (so
more like Metalua or LISP's macro system but for a low-level
language).
_______________________________________________
terralang mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/terralang

Reply via email to