2 ms·
> Do you thing this is doable? It would be a lot of work, but I think it's possible. (Please do trash my theories if you think I'm wrong though =p) > Do you h
by smoldesu 3y ago
> Do you thing this is doable?
It would be a lot of work, but I think it's possible. (Please do trash my theories if you think I'm wrong though =p)
> Do you have some pathway to suggest?
LLVM generates a bytecode called "IR" for many different languages (Rust and C included). Try and experiment with that, see if you can get bytecode from two languages to run in one binary. From there, the rest should be logistics!
> Do you like it?
Yes! But as a primarily Rust-based dev, I'm not entirely sure what I'd use other languages for. LLVM generates IR for a lot of languages though, so if you can get them working the value prop would increase exponentially.
- utfeight 3y agoThank you for your opinion. I know that you can generate IR using LLVM tools (clang, rust, zig etc.) but the "well-known" languages generally restrict you with some: - Static & Dynamic Typed Languages (which makes it almost impossible [0]) - Philosophies: e.g some languages embrace OOP-like systems for their general program design philosophy while others may not - These two are some of the cavities in my mind but simple primitive types wouldn't be that hard I think Even If It's just primitive types I think this can be a tool for automatic configration wrapper which would help a lot when integrating a new language to a program (e.g lua for neovim & awesomewm) -------------- [0]: I'm thinking some run-time checked generic type implementation but I need to figure A LOT for this. (something like rust's dynamic dispatch but more enhancable?) (maybe an enum for all edge cases? like Function, Struct, Class ...)