4 ms·
Elixir is just Lisp with a facelift[1], and lisps can be built on Python[2]. It stands to reason that an elixir-like can be built on Python too, so you could em
by djha-skin 2y ago
Elixir is just Lisp with a facelift[1], and lisps can be built on Python[2]. It stands to reason that an elixir-like can be built on Python too, so you could embed the Python runtime in Elixir but Elixir-likes are used to code for both.
1: https://wiki.alopex.li/ElixirForCynicalCurmudgeons https://wiki.alopex.li/ElixirForCynicalCurmudgeons
2: https://hylang.org/ https://hylang.org/
- pjmlp 2y agoIn a way Python is a bad Lisp, still looking forward that catches up in native code compilation and multiline lambdas. Could be better, but that is what mainstream gets.
- kazinator 2y agoWe can sort of make a shitty multi-line lambda in Python by making a dummy function called progn, and using it, like this: >>> def progn(*args): ... if args: ... return args[-1] ... else: ... return None ... >>> fun = lambda x : progn(print('abc'), ... print(x), ... print('def')) >>> >>> fun(42) abc 42 def :)
- ch4s3 2y agoThe operating environment of the BEAM is what's great about elixir. Hy still has the GIL.