3 ms·
Imo that's not Pythons great strength, although I like the syntax. Python is great because of the C interop. FFI in Java is horrible, and I assume it's not grea
by boxed 3y ago
Imo that's not Pythons great strength, although I like the syntax. Python is great because of the C interop. FFI in Java is horrible, and I assume it's not great in Erlang/Elixir either. In Python? It's pretty damn great. Which is why Pythons library ecosystem is so enormous.
- freedomben 3y agoElixir C interop is actually pretty pleasant. After Java I was expecting it to be a nightmare, but it was shockingly easy and well though out. The big thing in Elixir community right now is to write the native/performance code in Rust[1] and interop with Elixir. [1]: https://github.com/rusterlium/rustler https://github.com/rusterlium/rustler
- paradox460 3y agoThere are equivalent libraries for zig and Nim too
- josevalim 3y agoErlang has a well defined and clear layer for integrating with C code, including functionality to help you ensure the code you plug into will be thread-safe and work with the VM's underlying concurrency models: https://www.erlang.org/doc/man/erl_nif.html https://www.erlang.org/doc/man/erl_nif.html Erlang does not have low-ceremony ways of calling C from Erlang, as I believe Python has. It could be done but that would be frowned upon anyway, because it would defeat the preemptive and fault-tolerant guarantees of the runtime. So I guess it depends on what you mean by great. FWIW, Elixir has no problems integrating native code from XLA, LibTorch, Polars, that also powers equivalent libraries in Python.