3 ms·
Interesting article. Looking at the code, it's pretty clear that this is not a particularly practical approach, but I think it points in the direction of where
by smaddox 11y ago
Interesting article. Looking at the code, it's pretty clear that this is not a particularly practical approach, but I think it points in the direction of where language design should head. Abstractions shouldn't be forced, unless absolutely necessary; forced abstractions lead to inefficiency.
I've been working on a related concept, but more along the lines of developing a low-level IR (LLIR) and corresponding syntax that allows direct coding in the LLIR. It would essentially be a portable assembly language. The LLIR could be then be compiled down to machine code for different architectures, or even run directly in a VM.
This isn't too different from the LLVM concept, except the IR would be a practical programming language, much like assembly. Furthermore, the IR would provide access control primitives (reference capabilities) that most languages do not support, but that are extremely useful for low-overhead secure computing and concurrent computing. These primitives could be especially useful in the design of exokernel OS's, and related applications.
- fritzo 11y agoGosh, I thought C was "portable assembly". How would your LLIR differ from C?
- eru 11y agoC is not really portable assembly. It's full of undefined behaviour, for one.
- moonchrome 11y ago>I've been working on a related concept, but more along the lines of developing a low-level IR (LLIR) and corresponding syntax that allows direct coding in the LLIR. It would essentially be a portable assembly language. The LLIR could be then be compiled down to machine code for different architectures, or even run directly in a VM. Isn't this WebAssembly ? Bonus points they have sexpression based format and a binary format and are working on a LLVM backend for it + a bunch of JIT integrations, making sure it's portable and have a lot of people working on it from multiple companies.