r/ProgrammingLanguages • • Apr 11 '23

Functional bytecode

I'm interested in whether work has been done to create a bytecode that is less imperative and more of a functional style. My hunch is such a bytecode may be more amenable to fast interpretation, since stuff like loops may be dispatched more directly to native code (instead of individual flow control ops). Has anyone seen anything like this? How annoying would it be for traditional languages to get translated into such a bytecode (does it require vectorization?)?

62 Upvotes

23 comments sorted by

View all comments

Show parent comment

1

u/edgmnt_net Apr 11 '23

That's sort of what I'm thinking. The general application would be safe remote code execution, say much like BPF gets used in the Linux kernel or to submit queries as code to a database. So I do want as much structure as I can get to make it easier to judge safety (and in the end I'd get something like language-based protection, but more generic). And interpretation seems like good bet for now.