Elixir - what's the guiding philisophy behind using :erlang.float_to_binary/2 directly?

I've recently started learning Elixir and I'm puzzled by the arbitrary-looking divide between things that are available as Elixir modules vs. direct calls to Erlang libs.

Particularly I've noticed that formatting a Float into a string/binary is best done (in recent versions of Elixir) by directly calling the following function:

:erlang.float_to_binary/2

Perusing older questions and forum posts, I've seen several Elixir functions doing the above job (and sometimes just calling the above function) that were obsoleted and removed from Elixir.

What's the system in deciding which functions get an Elixir wrapper/implementation vs. direct calls to Erlang libs?

One reason I'm confused is that 'rendering a float as a string' feels like an incredibly basic language function, so I feel that I'm missing something when I see that Elixir doesn't provide it 'natively'.

1 answer