3 ms·
These "inter-lingual" examples such as https://github.com/Kimbsy/autology/blob/main/resources/examples/inter-lingual-4.atl https://github.com/Kimbsy/autology/bl
by johnisgood 2y ago
These "inter-lingual" examples such as https://github.com/Kimbsy/autology/blob/main/resources/examples/inter-lingual-4.atl https://github.com/Kimbsy/autology/blob/main/resources/examp... are pretty cool. What is the use-case of this or why would one want to do this? Just trying to bounce off ideas.
- jampekka 2y agoCalling code across languages at least is very widespread. And typically requires custom, often clunky, solutions for all language pairs.
- johnisgood 2y agoSo is this like a "better FFI", in some sense of the term?
- immibis 2y agoLooks like just automated FFI, putting some glue around your function and then invoking the appropriate compiler for that language. I don't really see the difference between (with-*i* "c" foo) and a macro that expands to (with-c "foo")
- Kimbsy 2y agoSo the best thing I could come up with (assuming a theoretical perfect implementation that wasn't horribly slow and expensive) was the idea that since many languages have their own niches and categories of problems that they are best used to express/solve, you could conceivably work on a complex problem where different parts of the computation are most elegantly expressed in different languages. So having a metalanguage that allows you to switch syntax in a lexical scope would be useful!? Highly doubtful that this benefit would outweigh the egregious complexity cost of using a language like Autology, but a fun thought experiment.
- johnisgood 2y agoIt is definitely worth pursuing. :)