[erlang-questions] Improve $handle_undefined_function

José Valim jose.valim@REDACTED
Wed Jan 23 00:50:56 CET 2013


>
> I can understand 1), but what's the point of 2)? Wouldn't it be better for
> that to be in the erlang/otp repository instead so that everything can
> benefit from it?


Loic, whenever it makes sense, I contribute patches back to OTP. :)

I would, for example, contribute our dict implementation, but I don't
believe OTP is looking for another dict implementation (I am going to write
a blog post with details and benchmarks soon for those interested).

Some of the stuff in our stdlib, like providing zero-index based access
everywhere is hard to "backport" to Erlang. And other stuff like the Enum
module, which is a bunch of functions meant to work on any enumerable data
structure, like lists, dicts, etc, requires protocols.

In any case, if you need/want to use any of Elixir modules from your Erlang
code, you can just drop them into your project. For example, you can use
our strings module, that is based on the Unicode Standarded, straight from
Erlang:

    'Elixir-String':capitalize(<<"fin">>)
    <<"Fin">>

I agree 'Elixir-String' is not the prettiest sight but that is because we
could not use 'Elixir.String' due to packages (RIP). I hope we can revert
this decision a while after R16 is out and make integration a bit more
pleasant.

In general, I am very excited about R16. It will enable us to use cover in
Elixir, ansi codes and more. And feel free to call me on anything you
believe I should be contributing to OTP directly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130122/cf5a275d/attachment.htm>


More information about the erlang-questions mailing list