3 ms·
I have long thought that we need a generic way of expressing foundational library code (datetimes, regex, math, json, http, etc) that could easily be lifted to
by 41b696ef1113 5y ago
I have long thought that we need a generic way of expressing foundational library code (datetimes, regex, math, json, http, etc) that could easily be lifted to other nascent languages. At minimum, the unit tests behind battle-tested packages that have encountered all of the edge cases that a green-field design is going to miss.
- fermuch 5y agoCould webassembly provide that? As far as I understand it can be seen as a target callable from any runtime (C, rust, python, the browser...) so a new language could implement wasm and all its libraries could be used?
- woadwarrior01 5y agoThis is one of the most promising aspects of GraalVM and Sulong[1]. [1]: https://github.com/oracle/graal/tree/master/sulong https://github.com/oracle/graal/tree/master/sulong
- cheriot 5y agoFor many languages isn't that the FFI to C?
- ComputerGuru 5y agoKind of but not really? That requires considerable effort adapting the target for anything written in a language with first-class object support and is woefully unergonomic.
- cheriot 5y agoAgreed C isn't an ergonomic one. A better one would need manual memory management, though, to avoid running an additional gc. In contrast to the target languages, it would need at least as much type information. I haven't worked with Rust, but I wonder if that will move into this space.
- kevin_thibedeau 5y agoThere was a time when Parrot was going to be the one ring.
- sidpatil 5y agoIf I understand correctly, OpenVMS made this straightforward—it was easy to call code written in one language from code written in another language. What we have today: 1) stick to languages which target a common VM, 2) hope your language supports FFI for the library's language, or 3) microservices, in the old-school fashion (piping to/from Unix binaries) or the new-school fashion (HTTPing JSON to/from containerized applications).