[erlang-questions] Elixir community, please be more responsible; Erlang community, please demand it.
José Valim
jose.valim@REDACTED
Sun Mar 24 20:09:04 CET 2019
> What if it was allowed for package maintainers to publish pre-compiled
BEAM files to Hex? I would imagine that everyone who is pushing packages to
Hex also has the ability to compile those packages on the machine they’re
using to publish.
Unfortunately that wouldn't solve the issue with macros, because macros are
still compiled to regular BEAMs. A precompiled BEAM wouldn't change the
module name nor the name of a function. The incompatibility is in the
calling convention and in the different ASTs (similar issue to LFE).
I feel there are some things that could be done from the Elixir side to
make things easier (it could maybe ship with a parse_transform?) but I feel
that, for full convenience, (small) changes would need to be done to Erlang
too, such as allowing ? and ! at the end of atoms without quoting (note: I
am not proposing it, just commenting on it).
Unfortunately, on the topic of macros, I can't see them working from Erlang
at all. But I don't consider it a bad thing. Well-designed libraries should
use macros just a thin layer on top of a proper functional APIs. For
example, the macro layer in Plug is very thin and it should be relatively
straight-forward to write your own plug web apps in Erlang. But I also feel
that even if we somehow port the Plug macro conveniences to Erlang, people
won't enjoy using it if you have to write things such as
'Elixir.Plug':send_resp(...).
Maybe if we overcome the initial awkwardness which is the different
namespace rules, there will be a growing interest in solving those problems.
*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190324/838e4a13/attachment.htm>
More information about the erlang-questions
mailing list